Sway: Idle inhibit if a window is focused which matches some criteria

Created on 5 Nov 2018  路  6Comments  路  Source: swaywm/sway

inhibit_idle [criteria] focus|visible|open
enhancement

Most helpful comment

We could also add inhibit_idle fullscreen to only inhibit idle if fullscreened.

All 6 comments

How about [criteria] inhibit_idle focus|visible|open? It'd be less code (don't have to deal with criteria in the command) and users could bind it to a key so it can run on the currently focused view.

Then it should be possible to use it with for_window [criteria] ... as well I think.

for_window [criteria] inhibit_idle  -> configuration for future windows
[criteria] inhibit_idle  -> assign to currently open windows
inhibit_idle  -> assign to focused window only

Hmm, I'm not sure I like that design.

We could also add inhibit_idle fullscreen to only inhibit idle if fullscreened.

For me it looks like inventing the wheel and making sway do the work of swayidle.
Shouldn't swayidle just implement org.freedesktop.PowerManagement? The only problem is that I was unable to find a specification for it (all links I found are 404). However, a lot of applications and desktop environments use it.

For me it looks like inventing the wheel and making sway do the work of swayidle.

Nah, applications can inhibit idle for a specific surface, making it possible to e.g. turn off all screens except the ones where a video is playing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ddevault picture ddevault  路  4Comments

emersion picture emersion  路  4Comments

StephenBrown2 picture StephenBrown2  路  4Comments

soymjolk picture soymjolk  路  3Comments

dnkl picture dnkl  路  4Comments