summaryrefslogtreecommitdiff
path: root/bin/menuscripts/mpower
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-07-24 13:10:33 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-07-24 13:10:33 +0200
commitc6a02c4aea87ba8a981fe6c448e1508c8cf7f1ff (patch)
treec174bc7d09d90c99eadd56f84cd8bfcab74b9e94 /bin/menuscripts/mpower
parent9049a073ee9a9644e27f4dbb52a4f591794258d7 (diff)
added suspend
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"