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:
parent
1b27c2eac5
commit
5925500930
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ case $(echo "$*" | grep -a -o -e "Shutdown" -e "Reboot" -e "Lockscreen" -e "Logo
|
||||||
"Suspend")
|
"Suspend")
|
||||||
if [ -n "$ROFI_POWERMENU_SUSPEND_CMD" ]; then eval "$ROFI_POWERMENU_SUSPEND_CMD"; else
|
if [ -n "$ROFI_POWERMENU_SUSPEND_CMD" ]; then eval "$ROFI_POWERMENU_SUSPEND_CMD"; else
|
||||||
lockscreen rofi </dev/null >/dev/null 2>/dev/null &
|
lockscreen rofi </dev/null >/dev/null 2>/dev/null &
|
||||||
systemctl suspend
|
systemctl hibernate
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue