diff options
| author | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2023-07-17 02:18:51 +0100 |
|---|---|---|
| committer | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2023-07-17 02:18:51 +0100 |
| commit | c85829dff52c0b3c2f6ecb02b98c1b78050b9c04 (patch) | |
| tree | a57506fe3842238cdeecec0829d369ba1d5d7288 /sway/scripts/exit-menu.sh | |
| parent | 659e9d81cbb5fda8d77e8ab2f7b4cc3fcfe74c20 (diff) | |
Add wofi exit menu
Diffstat (limited to 'sway/scripts/exit-menu.sh')
| -rwxr-xr-x | sway/scripts/exit-menu.sh | 18 |
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 |
