rofi: Switch sleep action to hibernate mode

Switched out the suspend action from the rofi powermenu (called through
super + backspace in current sxhkd setup) to instead call hibernate.

This needs a correctly set up system to engage hibernate - all the
documentation necessary can be found at
https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate

Generally, needs a swap file and resume (i.e. hibernation) correctly set
up in both the kernel parameters and the initramfs.

On this machine (laptop), the way things work now is that simply closing
the lid leads to the default sleep action (suspend), and invoking the
manual rofi-powermenu way will instead completely hibernate the system,
leading to less power usage but taking a little longer to switch off and
restore.
This commit is contained in:
Marty Oehme 2021-02-19 10:39:55 +01:00
parent 1b27c2eac5
commit 5925500930
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -58,7 +58,7 @@ case $(echo "$*" | grep -a -o -e "Shutdown" -e "Reboot" -e "Lockscreen" -e "Logo
"Suspend")
if [ -n "$ROFI_POWERMENU_SUSPEND_CMD" ]; then eval "$ROFI_POWERMENU_SUSPEND_CMD"; else
lockscreen rofi </dev/null >/dev/null 2>/dev/null &
systemctl suspend
systemctl hibernate
fi
;;
esac