diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-02 15:19:25 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-02 15:19:25 +0200 |
commit | 9b791ac8786eed2d242d0909dd2379f008952042 (patch) | |
tree | 403c08eb322e18d045606822911a7eb6036f0070 /bin/menuscripts | |
parent | e614a330978ce7e7f6d130cc7d199150e16a409d (diff) | |
parent | 63c64f071ecd45cf66ab49d199a634cd8db27056 (diff) |
Merge branch 'main' of db:dotfiles
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" |