dotfiles/home/.local/bin/scripts/gui/prompt/menuquit

29 lines
563 B
Plaintext
Raw Normal View History

#!/bin/bash
2023-01-25 01:10:02 +00:00
action="$(printf 'Quit WM\nLock session\nLogout\nLock TTYs\nPoweroff\nReboot\nNothing' | menuprompt -c --app wofi -p "Select Action" -- -O default)"
case "$action" in
"Quit WM")
hyprctl dispatch exit ""
;;
"Lock session")
loginctl lock-session
;;
2023-01-25 01:10:02 +00:00
"Logout")
loginctl terminate-user "$USER"
;;
"Lock TTYs")
physlock
;;
"Poweroff")
systemctl poweroff
;;
"Reboot")
systemctl reboot
;;
"Nothing") ;&
*)
exit 1
;;
esac