This commit is contained in:
2026-06-30 18:11:28 +02:00
parent 9445b1ff44
commit 8740b90834
2 changed files with 14 additions and 2 deletions
+1
View File
@@ -12,6 +12,7 @@ case $1 in
pre)
logger -t "SmartSleep" "Das System wechselt in den Energiesparmodus"
[ -n "$(pgrep smartsleepd)" ] || logger -t "SmartSleep" -p "user.warning" "Der Daemon läuft nicht!"
pkill signal
;;
post)
LID_STATUS="$( awk '{print $2}' < /proc/acpi/button/lid/LID0/state )" # open|closed
+13 -2
View File
@@ -14,8 +14,19 @@ checkSleep() {
fi
}
trap 'checkSleep && systemctl suspend' USR1
trap 'notify-send "SmartSleep" "Energiesparmodus beendet"; checkSleep' USR2
suspendStart() {
checkSleep && systemctl suspend
}
suspendFinish() {
notify-send "SmartSleep" "Energiesparmodus beendet"
checkSleep
#/opt/Signal/signal-desktop --no-sandbox &
#sleep 3 && kdocker -w $(xwininfo -root -tree | grep Signal | tail -n1 | awk '{print $1}')
}
trap 'suspendStart' USR1
trap 'suspendFinish' USR2
while true; do
sleep infinity &