SWAY desktop
from marathon01@lemmy.ml to linux@lemmy.ml on 19 Mar 14:34
https://lemmy.ml/post/27402257

OK Have Sway running just fine and am using it as my daily driver. What I’m missing is some way to prevent the display from sleeping when playing full-screen content. I adjusted the time-out in the sway config; however, that’s not the way to prevent the display from sleeping with full-screen active. Any ideas? With Gnome, one uses caffeine, but extensions don’t work with Sway. Thanks!

#linux

threaded - newest

JustineSmithies@lemmy.world on 19 Mar 14:56 next collapse

Maybe try wib here and use a rule in your Sway config to toggle it ?

a14o@feddit.org on 19 Mar 15:08 next collapse

No need for external programs:

for_window [class="^.*"] inhibit_idle fullscreen
for_window [app_id="^.*"] inhibit_idle fullscreen 
Static_Rocket@lemmy.world on 20 Mar 02:32 collapse

The inhibit_idle specifier is cool, thanks for the pointer. This two liner can be replaced with:

for_window [all] inhibit_idle fullscreen
a14o@feddit.org on 20 Mar 09:15 collapse

Nice, I didn’t know about the all selector

hallettj@leminal.space on 19 Mar 15:22 next collapse

Are you using swayidle? It’s supposed to automatically keep the screen on when there is full-screen video playing. It’s the same in Gnome: you generally don’t need caffeine if a full-screen video is going.

How are you playing videos? Maybe the player doesn’t correctly implement the idle inhibit protocol. Or if you’re using sway bindings to make the window fullscreen instead of using the app’s own fullscreen mode then maybe the player doesn’t know it’s fullscreen, and doesn’t set up the idle inhibit.

If you do want manual idle inhibit control, if you use Waybar it has an idle inhibitor module that mimics caffeine. If you don’t use Waybar there is a little Python script you can run. Kill it when you want to stop inhibiting idle. actually wib looks like a better option

marathon01@lemmy.ml on 19 Mar 19:43 collapse

The 2 line stanza works from a14o. However, the site you linked has lots of useful information that I’ll use to set up my waybar icons!

marathon01@lemmy.ml on 19 Mar 19:35 collapse

Thank-you, @a14o@feddit.org works perfectly!