diff --git a/hosts/by-name/moby/polyfill.nix b/hosts/by-name/moby/polyfill.nix index 7fef21a9d..fe4a5aba7 100644 --- a/hosts/by-name/moby/polyfill.nix +++ b/hosts/by-name/moby/polyfill.nix @@ -10,6 +10,7 @@ # N.B. some deviceprofiles explicitly set SXMO_SWAY_SCALE, overwriting what we put here. SXMO_SWAY_SCALE = "1.5"; SXMO_ROTATION_GRAVITY = "12800"; + SXMO_LOCK_IDLE_TIME = "15"; # how long between screenoff -> lock -> back to screenoff DEFAULT_COUNTRY = "US"; BROWSWER = "librewolf"; }; diff --git a/pkgs/additional/sxmo-utils/0106-configurable-auto-screenoff.patch b/pkgs/additional/sxmo-utils/0106-configurable-auto-screenoff.patch new file mode 100644 index 000000000..d54605625 --- /dev/null +++ b/pkgs/additional/sxmo-utils/0106-configurable-auto-screenoff.patch @@ -0,0 +1,13 @@ +diff --git a/configs/default_hooks/three_button_touchscreen/sxmo_hook_lock.sh b/configs/default_hooks/three_button_touchscreen/sxmo_hook_lock.sh +index c9c4263..4c0fccf 100755 +--- a/configs/default_hooks/three_button_touchscreen/sxmo_hook_lock.sh ++++ b/configs/default_hooks/three_button_touchscreen/sxmo_hook_lock.sh +@@ -37,7 +37,7 @@ sxmo_daemons.sh stop periodic_wakelock_check + # Go to screenoff after 8 seconds of inactivity + if ! [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then + sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \ +- timeout 8 "sxmo_hook_screenoff.sh" ++ timeout "${SXMO_LOCK_IDLE_TIME:-8}" "sxmo_hook_screenoff.sh" + fi + + wait diff --git a/pkgs/additional/sxmo-utils/default.nix b/pkgs/additional/sxmo-utils/default.nix index 0ff64e8cf..8283f8733 100644 --- a/pkgs/additional/sxmo-utils/default.nix +++ b/pkgs/additional/sxmo-utils/default.nix @@ -92,6 +92,7 @@ stdenv.mkDerivation rec { # personal (but upstreamable) preferences: ./0104-full-auto-rotate.patch ./0105-more-apps.patch + ./0106-configurable-auto-screenoff.patch ]; postPatch = ''