aboutsummaryrefslogtreecommitdiffstats
path: root/sway/scripts/exit-menu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sway/scripts/exit-menu.sh')
-rwxr-xr-xsway/scripts/exit-menu.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/sway/scripts/exit-menu.sh b/sway/scripts/exit-menu.sh
new file mode 100755
index 0000000..a492df8
--- /dev/null
+++ b/sway/scripts/exit-menu.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+entries=" Lock\n󰹆 Suspend\n󰍃 Logout\n󰜉 Reboot\n󰐥 Shutdown"
+
+selected=$(echo -e $entries|wofi --width 100 --height 185 --dmenu --cache-file /dev/null --define content_halign=center --define prompt="Exit menu" | awk '{print tolower($2)}')
+
+case $selected in
+ lock)
+ swaylock;;
+ logout)
+ swaymsg exit;;
+ suspend)
+ exec systemctl suspend;;
+ reboot)
+ exec systemctl reboot;;
+ shutdown)
+ exec systemctl poweroff -i;;
+esac