diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2024-02-19 22:32:41 +0000 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2024-02-19 22:32:41 +0000 |
| commit | 977a459ddaa33a856255be9c15464f0a5937c06c (patch) | |
| tree | 9f4b2b86a0863fda1d8eebae05b1c99df1cf7af1 /bin/exit-menu.sh | |
| parent | 373891b492424c64ba8071affd38801a057e35ef (diff) | |
Add scripts to repo
Diffstat (limited to 'bin/exit-menu.sh')
| -rwxr-xr-x | bin/exit-menu.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/exit-menu.sh b/bin/exit-menu.sh new file mode 100755 index 0000000..763007e --- /dev/null +++ b/bin/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) + hyprctl dispatch exit;; + suspend) + exec systemctl suspend;; + reboot) + exec systemctl reboot;; + shutdown) + exec systemctl poweroff -i;; +esac |
