nix-files/hosts/modules/gui/sxmo/hooks/sxmo_hook_screenoff.sh
Colin 6ee9e8e405 sxmo_hook_screenoff: decrease the blink frequency even more
if i was smarter i'd just disable the periodic blinking right before entering sleep
2024-01-01 07:24:08 +00:00

22 lines
623 B
Bash
Executable File

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p sway
# this hook is mostly identical to default sxmo_hook_screenoff.sh except:
# - the LED frequency is adjusted from its default of "blink every 2s"
# - dwm-specific bits are removed
BLINK_FREQ=12
swaymsg mode default
sxmo_wm.sh dpms on
sxmo_wm.sh inputevent touchscreen off
sxmo_jobs.sh start periodic_blink sxmo_run_periodically.sh "$BLINK_FREQ" sxmo_led.sh blink red blue
wait
# # avoid immediate suspension. particularly, ensure that we get at least one blink in
# sxmo_wakelock.sh lock sxmo_hold_a_bit "$BLINK_FREQ"s
# sxmo_wakelock.sh unlock sxmo_not_screenoff