diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/menuscripts/mpower | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower index 443ed54..005c497 100755 --- a/bin/menuscripts/mpower +++ b/bin/menuscripts/mpower @@ -1,14 +1,7 @@ #!/bin/sh -if [ "$MENUCMD" = "tofi" ] -then - menucmd="tofi --width 10% --height 13% --padding-left 2%" -elif [ "$MENUCMD" = "dmenu" ] -then - menucmd="dmenu -g 2 -l 2" -else - menucmd="fzf" -fi +choice="$(printf 'poweroff +suspend +hibernate +reboot' | commander -c -d)" -choices="poweroff\nreboot\nhibernate\nsuspend" -choice="$(printf "$choices" | $menucmd)" -test -z "$choice" || systemctl "$choice" +[ "$choice" ] && systemctl "$choice" |