summaryrefslogtreecommitdiff
path: root/bin/menuscripts/mpower
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-04-17 18:55:38 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-04-17 19:02:28 +0200
commite1254e11ae320848c2fc6ce329a33db107083b9f (patch)
tree49c6257d03d02a31ac78717cfede876ff9fa9dff /bin/menuscripts/mpower
parentca569f466565dc9d435aa6fd96c1905a12c40216 (diff)
moved menuscripts to seperate folder
Diffstat (limited to 'bin/menuscripts/mpower')
-rwxr-xr-xbin/menuscripts/mpower13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower
new file mode 100755
index 0000000..f03fd8e
--- /dev/null
+++ b/bin/menuscripts/mpower
@@ -0,0 +1,13 @@
+#!/bin/sh
+if [ "$MENUCMD" = "tofi" ]
+then
+ menucmd="tofi --width 10% --height 10% --padding-left 2%"
+elif [ "$MENUCMD" = "dmenu" ]
+then
+ menucmd="dmenu -g 2 -l 1"
+else
+ menucmd="fzf"
+fi
+
+choice="$(echo "poweroff\nreboot\nhibernate" | $menucmd)"
+test -z "$choice" || doas "$choice"