hook_screenoff: blink purple only when suspend is enabled

When autosuspend is disabled, the purple LED blinks indefinitely, since
screenoff is the lowest idle state possible in that case. The purple LED
notification is meant to notify the user that that system is in screenoff, and
will likely suspend soon, thus for users who disable autosuspend, the blink
loses meaning. Disable it for this case.

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This commit is contained in:
Sicelo A. Mhlongo
2024-04-25 00:14:44 +02:00
committed by Willow Barraco
parent 1172819f59
commit bccc1ab88d

View File

@@ -22,7 +22,9 @@ sxmo_led.sh blink red blue &
sxmo_wm.sh dpms on
sxmo_wm.sh inputevent touchscreen off
sxmo_jobs.sh start periodic_blink sxmo_run_periodically.sh - 2 sxmo_led.sh blink red blue
if [ -e "$XDG_CACHE_HOME"/sxmo/sxmo.nosuspend ]; then
sxmo_jobs.sh start periodic_blink sxmo_run_periodically.sh - 2 sxmo_led.sh blink red blue
fi
case "$SXMO_WM" in
dwm)