summaryrefslogtreecommitdiff
path: root/config/waybar/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'config/waybar/scripts')
-rwxr-xr-xconfig/waybar/scripts/power.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/config/waybar/scripts/power.sh b/config/waybar/scripts/power.sh
new file mode 100755
index 000000000..df0643dba
--- /dev/null
+++ b/config/waybar/scripts/power.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+choice=$(printf "Poweroff\nReboot\nLogout" | wofi \
+ --dmenu \
+ --window \
+ --normal-window \
+ --hide-scroll true \
+ --hide-search true \
+ --prompt "" \
+ --width 10 \
+ --lines 3 \
+ --columns 1)
+
+case "$choice" in
+Poweroff)
+ hyprshutdown --post-cmd 'systemctl poweroff'
+ ;;
+Reboot)
+ hyprshutdown --post-cmd 'systemctl reboot'
+ ;;
+Logout)
+ hyprshutdown
+ ;;
+esac