2023-10-11 02:05:55 +00:00
|
|
|
#!/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
|
|
|
|
|
2023-10-14 10:24:35 +00:00
|
|
|
BLINK_FREQ=8
|
2023-10-11 02:05:55 +00:00
|
|
|
|
|
|
|
swaymsg mode default
|
|
|
|
sxmo_wm.sh dpms on
|
|
|
|
sxmo_wm.sh inputevent touchscreen off
|
|
|
|
|
2023-11-20 02:31:55 +00:00
|
|
|
sxmo_jobs.sh start periodic_blink sxmo_run_periodically.sh "$BLINK_FREQ" sxmo_led.sh blink red blue
|
2023-10-11 02:05:55 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|