sleep hack for surface
This commit is contained in:
@@ -13,7 +13,7 @@ case $SELECTION in
|
||||
gtklock;;
|
||||
*" Suspend"*)
|
||||
if confirm_action "Suspend"; then
|
||||
systemctl suspend
|
||||
systemctl suspend-then-hibernate
|
||||
fi;;
|
||||
*" Log out"*)
|
||||
if confirm_action "Log out"; then
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[Login]
|
||||
IdleAction=suspend-then-hibernate
|
||||
IdleAction=hibernate
|
||||
IdleActionSec=10min
|
||||
HandlePowerKey=suspend-then-hibernate
|
||||
HandlePowerKey=hibernate
|
||||
HandlePowerKeyLongPress=poweroff
|
||||
HandleLidSwitch=suspend-then-hibernate
|
||||
HandleLidSwitchExternalPower=suspend-then-hibernate
|
||||
HandleLidSwitch=hibernate
|
||||
HandleLidSwitchExternalPower=hibernate
|
||||
HandleLidSwitchDocked=ignore
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file (or a link to it) must be in /lib/systemd/system-sleep/iptsd.sh
|
||||
logger -t "iptsd-hack" "\$0=$0, \$1=$1, \$2=$2"
|
||||
|
||||
if [ $1 == "pre" ]; then
|
||||
logger -t "iptsd-hack" "stopping iptsd"
|
||||
iptsd-systemd -- stop
|
||||
else
|
||||
logger -t "iptsd-hack" "starting iptsd"
|
||||
iptsd-systemd -- start
|
||||
fi
|
||||
@@ -1,8 +1,8 @@
|
||||
[Login]
|
||||
IdleAction=suspend-then-hibernate
|
||||
IdleAction=hibernate
|
||||
IdleActionSec=10min
|
||||
HandlePowerKey=suspend-then-hibernate
|
||||
HandlePowerKey=hibernate
|
||||
HandlePowerKeyLongPress=poweroff
|
||||
HandleLidSwitch=suspend-then-hibernate
|
||||
HandleLidSwitchExternalPower=suspend-then-hibernate
|
||||
HandleLidSwitch=hibernate
|
||||
HandleLidSwitchExternalPower=hibernate
|
||||
HandleLidSwitchDocked=ignore
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file (or a link to it) must be in /lib/systemd/system-sleep/iptsd.sh
|
||||
logger -t "iptsd-hack" "\$0=$0, \$1=$1, \$2=$2"
|
||||
|
||||
if [ $1 == "pre" ]; then
|
||||
logger -t "iptsd-hack" "stopping iptsd"
|
||||
iptsd-systemd -- stop
|
||||
else
|
||||
logger -t "iptsd-hack" "starting iptsd"
|
||||
iptsd-systemd -- start
|
||||
fi
|
||||
@@ -345,8 +345,11 @@ def install_sway(overwrite: bool, reinstall: bool) -> None:
|
||||
"etc/systemd/logind.conf.d/suspend.conf",
|
||||
"etc/systemd/sleep.conf.d/hibernate.conf",
|
||||
"etc/greetd/sway.cfg",
|
||||
"lib/systemd/system-sleep/iptsd.sh",
|
||||
]:
|
||||
src = CUSTOM_SRC / "ROOT" / sub
|
||||
if not src.exists():
|
||||
continue
|
||||
tgt = ROOT_TGT / sub
|
||||
run(["sudo", "mkdir", "-p", str(tgt.parent)])
|
||||
if tgt.exists():
|
||||
|
||||
Reference in New Issue
Block a user