Add automatic idle inhibition for fullscreen playback and selected apps

This commit is contained in:
Samuel Onoja committed 2026-10-03 11:20:55 +01:00
1 parent 453ec16583
commit 03a265b97f
17 files changed
+842 -22

No files matched your search

+47 -1
View File
@@ -534,6 +534,7 @@ window rules can override that behavior.
| `width`, `height` | numbers > 0 | Application-chosen floating size |
| `fullscreen` | boolean | Leave fullscreen state unchanged |
| `block-out-from-screencasts` | boolean | Exclude from captures; enabled by default for Ferese authentication dialogs |
| `idle-inhibit` | `none`, `visible`, `fullscreen`, `playing`, `fullscreen-playing` | Automatic fullscreen playback; see [Idle inhibition](#idle-inhibition) |
`window-rule app-id="org.example.Private" block-out-from-screencasts=#true`
keeps matching windows visible on the display but omits them (including their
@@ -574,7 +575,9 @@ Transient dialogs and cancelled drags do not update this memory. Floating → ti
→ floating also restores the window's last floating geometry. Nested previews
keep drag memory in process and do not write the user's saved placements.
Title changes do not trigger new rules; config rule changes apply to existing windows.
Title changes do not reapply placement rules. Capture privacy and idle inhibition
follow current app ID, title and parent metadata. Config rule changes apply to
existing windows.
```kdl
window-rule app-id="dev.ferese.Settings" floating=#true
@@ -776,6 +779,49 @@ unlock in a nested compositor before enabling automatic locking. A crashed
locker leaves the session locked; recovery requires ending that session from
another TTY.
## Idle inhibition
Ferese keeps the session awake during fullscreen playback when an application
reports `Playing` through MPRIS. Pausing or stopping playback releases this
automatic inhibition. A window must have content visible on an awake display;
switching away, closing it, locking the session or sleeping its display releases
inhibition too.
Disable the default fullscreen playback policy with:
```kdl
idle-inhibit {
fullscreen-playback #false
}
```
Use window rules for presentations, games or other apps that should keep the
session awake while visible:
```kdl
window-rule app-id="org.example.Presentation" idle-inhibit="visible"
```
| `idle-inhibit` rule | Behavior |
| --- | --- |
| `visible` | Inhibit while visible, regardless of playback state |
| `fullscreen` | Inhibit while visible and fullscreen |
| `playing` | Inhibit while visible and its MPRIS player reports `Playing` |
| `fullscreen-playing` | Inhibit while visible, fullscreen and its MPRIS player reports `Playing` |
| `none` | Disable automatic inhibition for this window |
MPRIS identifies an application, not an individual video window. Ferese matches
the player's process ID first, then its `DesktopEntry` against the window's app
ID. If several windows match, automatic playback inhibition stays off. MPRIS
also does not distinguish audio from video, so fullscreen audio playback can
inhibit too. Players without MPRIS can request inhibition through the existing
Wayland or portal protocols; a fullscreen window alone does not prove playback.
These settings control automatic inhibition. They do not override an
application's own Wayland or portal request, and they do not block manual
locking or suspend. Run `feresectl get-idle-inhibition` to inspect the current
inhibition state and discovered players. Changes take effect on config reload.
## Optional session protocols
These are launch-time environment switches, not KDL keys. Enable only for