Files
moonarch/defaults/xdg/stasis/stasis.rune
T
nevaforget 633318d5cb fix(stasis): declare the suspend inhibit knobs
stasis 1.5.1 discards any config missing a knob its own template carries,
backs it up and starts over from that template, so the timeouts here never
took effect. Both lists are empty on purpose.
2026-08-31 11:55:05 +02:00

119 lines
3.4 KiB
Plaintext

# Stasis idle manager configuration for Moonarch
# Manages screen dimming, DPMS, lock, and suspend timers
@author "Moonarch"
@description "Idle management for Moonarch (Niri + swaylock)"
default:
# monitor_media: detect active media via PipeWire/PulseAudio sink-inputs
# (pactl), not MPRIS. Non-browser players (mpv, vlc, ...) are counted and
# inhibit idle. Browser audio is excluded by design; browser idle-inhibit is
# expected via D-Bus (enable_dbus_inhibit), which Waterfox/Firefox only send
# in fullscreen -- so windowed browser video is NOT caught by stasis.
# ignore_remote_media false: also count remote players (Spotify-remote,
# KDEConnect, Chromecast); has no effect on windowed browser video.
monitor_media true
ignore_remote_media false
# Both empty on purpose: nothing here should keep the machine awake beyond
# what inhibit_apps already covers. They are set rather than omitted because
# stasis discards any config missing a knob its own template carries, backing
# it up and starting over from that template.
suspend_inhibit_apps [ ]
suspend_inhibit_media [ ]
# App/process inhibit patterns (apps that don't use D-Bus idle-inhibit)
inhibit_apps [
"vlc"
"mpv"
"celluloid"
r"steam_app_.*"
"gamescope"
"virt-manager"
"qemu"
"obs"
"kdenlive"
"handbrake"
"blender"
]
# Lid actions (laptop only)
lid_close_action "swaylock -f"
lid_open_action ""
# Desktop plan (machines without a battery)
#
# These blocks sit directly under `default:` on purpose: stasis builds the
# desktop plan from exactly those, with the ac:/battery: containers excluded
# (src/config/mod.rs, parse_plan_block "default"). A machine whose chassis
# reports no battery gets PlanSource::Desktop, and select_plan_source only
# ever falls back *onto* the desktop plan, never from it onto ac: -- so with
# the action blocks living in ac:/battery: alone, a desktop ran a plan of
# disabled steps: no DPMS, no lock, "waiting for idle" forever.
#
# Timeouts match the ac: plan below, so a docked laptop and a desktop behave
# alike. Deliberately only two steps:
# brightness -- brightnessctl drives an internal panel; external monitors
# need DDC/CI, which it does not speak.
# suspend -- suspending a desktop is a separate decision, not part of
# idle screen handling.
dpms:
timeout 120
command "niri msg action power-off-monitors"
resume_command "niri msg action power-on-monitors"
end
lock_screen:
timeout 180
command "swaylock -f"
end
# AC power plan (relaxed)
ac:
brightness:
timeout 300
command "brightnessctl set 50%"
end
dpms:
timeout 120
command "niri msg action power-off-monitors"
resume_command "niri msg action power-on-monitors"
end
lock_screen:
timeout 180
command "swaylock -f"
end
suspend:
timeout 600
command "systemctl suspend"
end
end
# Battery plan (aggressive)
battery:
brightness:
timeout 60
command "brightnessctl set 30%"
end
dpms:
timeout 30
command "niri msg action power-off-monitors"
resume_command "niri msg action power-on-monitors"
end
lock_screen:
timeout 60
command "swaylock -f"
end
suspend:
timeout 120
command "systemctl suspend"
end
end
end