simple-power-menu: add hibernation option

This commit is contained in:
Guilherme Rugai Freire 2024-05-28 11:24:55 -03:00
parent 6869c0ab9a
commit 6f707f4e27
No known key found for this signature in database
GPG Key ID: AC1D9B6E48E16AC1

View File

@ -15,6 +15,7 @@ _fn_logout() {
*i3*) i3-msg exit;;
*qtile*) killall qtile;;
*fluxbox*) killall fluxbox;;
*gnome*) gnome-session-quit --logout --no-prompt;;
*bspwm*) bspc quit 1;;
*) loginctl terminate-session "${XDG_SESSION_ID-}";;
esac
@ -29,9 +30,16 @@ _suspend() {
systemctl suspend
}
_hibernate() {
_lockscreen &
systemctl hibernate
}
OPTIONS="\
Shutdown \tsystemctl poweroff
Reboot \tsystemctl reboot
Hibernate \t_hibernate
Suspend \t_suspend
Lockscreen \t_lockscreen
Log out \t_fn_logout"