mirror of
https://github.com/GRFreire/scripts.git
synced 2026-01-09 04:49:38 +00:00
simple-power-menu: add hibernation option
This commit is contained in:
parent
6869c0ab9a
commit
6f707f4e27
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user