summaryrefslogtreecommitdiff
path: root/bin/menuscripts/mpower
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-08-22 23:08:50 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-08-22 23:08:50 +0200
commit067b271a243dafcf652fe7cfe85e723d25ff1a64 (patch)
treec546402b2c40ca1e0739d1cc404f1d04d1d45067 /bin/menuscripts/mpower
parent67a2df82d25f52ea0937f4eed355546deae7b4b5 (diff)
parent9172676556847ff625cbf4b4eff19f441e0b9386 (diff)
Merge branch 'main' of /var/git/dotfiles
Diffstat (limited to 'bin/menuscripts/mpower')
-rwxr-xr-xbin/menuscripts/mpower18
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"