blob: 5289b8a54df938c59ae912b1220d2a09628ddf64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
# This file was auto-generated by Stasis on first run
# Feel free to customize it to your needs
# Master config reference: `/usr/share/doc/stasis/stasis.rune`
@author "Dustin Pilgrim"
@description "Lightweight feature packed idle manager for Wayland"
# Semantics:
# - Everything lives under `default:` (and optional profile blocks).
# - On laptops, Stasis chooses between:
# `default.ac:` and `default.battery:`
# depending on current power source.
# - Lid actions live under `default:` (globals) so they apply on BOTH AC and Battery
# unless a profile overlays/clears them.
default:
# Optional: listen for loginctl lock/unlock-session signals (default false)
# NOTE: this only updates internal state when lock/unlock signals are received;
# it does not actually run your locker command.
#enable_loginctl true
# Optional: listen for session D-Bus inhibit traffic (default true).
# This gate is not browser-only: browsers, Steam, and other desktop apps can
# request inhibit through standard D-Bus/portal paths.
# Browser/media-tab inhibit lives here, not under monitor_media.
# Disable this only if you explicitly do not want D-Bus inhibit requests
# to pause idle progression.
# enable_dbus_inhibit true
# Optional: run before suspending (hook).
#
# Behavior:
# - This command runs RIGHT BEFORE the suspend step, and Stasis currently WAITS
# for it to exit before continuing to suspend.
# - Therefore, a foreground screen locker (e.g. `swaylock -F`, `hyprlock`) will
# BLOCK suspend unless it daemonizes / returns quickly.
# - Also: do NOT run your locker BOTH here and in `lock_screen.command`.
# If you already have a lock step, leave `pre_suspend_command` unset.
#
# Good uses:
# pre_suspend_command "sync"
# pre_suspend_command "~/.local/bin/my-pre-sleep-hook"
#
# If you do NOT have a lock step and you want "lock right before suspend",
# use a locker that exits immediately (daemon/background), e.g. via a wrapper script.
#pre_suspend_command "sync"
# Non-browser media/audio inhibit only. Browser/media-tab inhibit is handled
# by enable_dbus_inhibit above.
monitor_media true
ignore_remote_media true # ignore remote players (spotify/kdeconnect/etc.)
# Optional: ignore these media sources for media inhibit (case-insensitive)
#media_blacklist ["spotify"]
# Debounce window in seconds before starting the plan (default 0)
#debounce_seconds 4
# Notify when resuming from IPC pause (e.g., `stasis pause 1h`)
#notify_on_unpause true
# Global gate: notifications before steps only happen if this is true
#notify_before_action true
# App/process inhibit patterns (strings or regex literals)
inhibit_apps [
"hayase"
"fladder"
"mpv"
r"steam_app_.*"
]
# -----------------------------
# Lid actions (LAPTOP ONLY)
#
# Shell commands run immediately on lid close or open.
# Lid close/open also pause/resume the plan timers regardless.
#
# These are GLOBAL under `default:` so they apply to BOTH `ac:` and `battery:` plans.
# A profile can override them or clear them (set to "").
#
# Examples:
# lid_close_action "swaylock"
# lid_open_action "brightnessctl set 60%"
# -----------------------------
lid_close_action "swaylock"
#lid_open_action ""
# Laptop plan: AC power (relaxed)
ac:
brightness:
timeout 300 # 5 minute(s)
command "brightnessctl set 50%"
end
dpms:
timeout 120 # 2 minute(s) after brightness
command "niri msg action power-off-monitors"
resume_command "niri msg action power-on-monitors"
end
lock_screen:
timeout 180 # 3 minute(s) after dpms
command "swaylock"
# Optional per-step notification:
#notification "Locking session soon"
#notify_seconds_before 10
end
suspend:
timeout 600 # 10 minute(s) after lock
command "systemctl suspend"
end
end
# Laptop plan: Battery power (aggressive)
battery:
brightness:
timeout 60 # 1 minute(s)
command "brightnessctl set 30%"
end
dpms:
timeout 30 # 30 second(s) after brightness
command "niri msg action power-off-monitors"
resume_command "niri msg action power-on-monitors"
end
lock_screen:
timeout 60 # 1 minute(s) after dpms
command "swaylock"
end
suspend:
timeout 120 # 2 minute(s) after lock
command "systemctl suspend"
end
end
end
|