sleep hack for surface
This commit is contained in:
@@ -13,7 +13,7 @@ case $SELECTION in
|
|||||||
gtklock;;
|
gtklock;;
|
||||||
*" Suspend"*)
|
*" Suspend"*)
|
||||||
if confirm_action "Suspend"; then
|
if confirm_action "Suspend"; then
|
||||||
systemctl suspend
|
systemctl suspend-then-hibernate
|
||||||
fi;;
|
fi;;
|
||||||
*" Log out"*)
|
*" Log out"*)
|
||||||
if confirm_action "Log out"; then
|
if confirm_action "Log out"; then
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
[Login]
|
[Login]
|
||||||
IdleAction=suspend-then-hibernate
|
IdleAction=hibernate
|
||||||
IdleActionSec=10min
|
IdleActionSec=10min
|
||||||
HandlePowerKey=suspend-then-hibernate
|
HandlePowerKey=hibernate
|
||||||
HandlePowerKeyLongPress=poweroff
|
HandlePowerKeyLongPress=poweroff
|
||||||
HandleLidSwitch=suspend-then-hibernate
|
HandleLidSwitch=hibernate
|
||||||
HandleLidSwitchExternalPower=suspend-then-hibernate
|
HandleLidSwitchExternalPower=hibernate
|
||||||
HandleLidSwitchDocked=ignore
|
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]
|
[Login]
|
||||||
IdleAction=suspend-then-hibernate
|
IdleAction=hibernate
|
||||||
IdleActionSec=10min
|
IdleActionSec=10min
|
||||||
HandlePowerKey=suspend-then-hibernate
|
HandlePowerKey=hibernate
|
||||||
HandlePowerKeyLongPress=poweroff
|
HandlePowerKeyLongPress=poweroff
|
||||||
HandleLidSwitch=suspend-then-hibernate
|
HandleLidSwitch=hibernate
|
||||||
HandleLidSwitchExternalPower=suspend-then-hibernate
|
HandleLidSwitchExternalPower=hibernate
|
||||||
HandleLidSwitchDocked=ignore
|
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/logind.conf.d/suspend.conf",
|
||||||
"etc/systemd/sleep.conf.d/hibernate.conf",
|
"etc/systemd/sleep.conf.d/hibernate.conf",
|
||||||
"etc/greetd/sway.cfg",
|
"etc/greetd/sway.cfg",
|
||||||
|
"lib/systemd/system-sleep/iptsd.sh",
|
||||||
]:
|
]:
|
||||||
src = CUSTOM_SRC / "ROOT" / sub
|
src = CUSTOM_SRC / "ROOT" / sub
|
||||||
|
if not src.exists():
|
||||||
|
continue
|
||||||
tgt = ROOT_TGT / sub
|
tgt = ROOT_TGT / sub
|
||||||
run(["sudo", "mkdir", "-p", str(tgt.parent)])
|
run(["sudo", "mkdir", "-p", str(tgt.parent)])
|
||||||
if tgt.exists():
|
if tgt.exists():
|
||||||
|
|||||||
Reference in New Issue
Block a user