aboutsummaryrefslogtreecommitdiff
path: root/rofi/powermenu.sh
diff options
context:
space:
mode:
authoreric.marin <maarin.eric@gmail.com>2024-09-11 14:49:39 +0200
committereric.marin <maarin.eric@gmail.com>2024-09-11 14:59:47 +0200
commit9f20c1f313e20102dd83adeaf091284be1fd82d0 (patch)
treed3db386875af532f4fc55c275312c7c787e88f55 /rofi/powermenu.sh
downloaddotfiles-9f20c1f313e20102dd83adeaf091284be1fd82d0.tar.gz
dotfiles-9f20c1f313e20102dd83adeaf091284be1fd82d0.zip
config
Diffstat (limited to '')
-rwxr-xr-xrofi/powermenu.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/rofi/powermenu.sh b/rofi/powermenu.sh
new file mode 100755
index 0000000..2adc4c4
--- /dev/null
+++ b/rofi/powermenu.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+poweroff=""
+reboot=""
+lock=""
+exit="󰗼"
+
+chosen=$(echo -e "$poweroff\n$reboot\n$lock\n$exit" | rofi -dmenu -theme powermenu.rasi)
+
+case "$chosen" in
+ "$poweroff") shutdown now ;;
+ "$reboot") reboot ;;
+ "$lock") loginctl lock-session ;;
+ "$exit") hyprctl dispatch exit ;;
+ *) exit 1 ;;
+esac
+