summaryrefslogtreecommitdiff
path: root/bin/menuscripts/mpower
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-08-02 15:19:25 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-08-02 15:19:25 +0200
commit9b791ac8786eed2d242d0909dd2379f008952042 (patch)
tree403c08eb322e18d045606822911a7eb6036f0070 /bin/menuscripts/mpower
parente614a330978ce7e7f6d130cc7d199150e16a409d (diff)
parent63c64f071ecd45cf66ab49d199a634cd8db27056 (diff)
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin/menuscripts/mpower')
-rwxr-xr-xbin/menuscripts/mpower9
1 files changed, 5 insertions, 4 deletions
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"