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