diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-30 08:23:45 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-30 08:23:45 +0200 |
commit | 3f8594ee04d2a3d9b40a259daf3b564a53b510fa (patch) | |
tree | 66ed50643cdc81af813b5771a99732d0f78bb618 /bin/menuscripts/mpower | |
parent | 45d39ae0c67bb086f4df0c366b251e06c888408d (diff) | |
parent | 333aaf38c66a1e4ba41d3acea38b21613c0075b2 (diff) |
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin/menuscripts/mpower')
-rwxr-xr-x | bin/menuscripts/mpower | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower index 443ed54..3b66824 100755 --- a/bin/menuscripts/mpower +++ b/bin/menuscripts/mpower @@ -1,14 +1,8 @@ #!/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" |