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