diff options
Diffstat (limited to 'bin/menuscripts')
-rwxr-xr-x | bin/menuscripts/mpass | 3 | ||||
-rwxr-xr-x | bin/menuscripts/mpower | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass index 87559e9..a50f0fb 100755 --- a/bin/menuscripts/mpass +++ b/bin/menuscripts/mpass @@ -6,7 +6,7 @@ then menucmd="tofi --prompt pass:" elif [ "$MENUCMD" = "dmenu" ] then - menucmd="dmenu -l 4 -g 2 -x -i -p pass:" + menucmd="dmenu -l 4 -g 2 -i -p pass:" else menucmd="fzf --prompt pass:" fi @@ -17,6 +17,7 @@ do file="$file/$choice" done +test -z "$file" && exit 1 pass show -c "$file" && if [ -n "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null then diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower index f03fd8e..443ed54 100755 --- a/bin/menuscripts/mpower +++ b/bin/menuscripts/mpower @@ -1,13 +1,14 @@ #!/bin/sh if [ "$MENUCMD" = "tofi" ] then - menucmd="tofi --width 10% --height 10% --padding-left 2%" + menucmd="tofi --width 10% --height 13% --padding-left 2%" elif [ "$MENUCMD" = "dmenu" ] then - menucmd="dmenu -g 2 -l 1" + menucmd="dmenu -g 2 -l 2" else menucmd="fzf" fi -choice="$(echo "poweroff\nreboot\nhibernate" | $menucmd)" -test -z "$choice" || doas "$choice" +choices="poweroff\nreboot\nhibernate\nsuspend" +choice="$(printf "$choices" | $menucmd)" +test -z "$choice" || systemctl "$choice" |