this post was submitted on 19 Mar 2025
24 points (92.9% liked)

Linux

52095 readers
1466 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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!

top 7 comments
sorted by: hot top controversial new old
[–] a14o@feddit.org 21 points 1 day ago (1 children)

No need for external programs:

for_window [class="^.*"] inhibit_idle fullscreen
for_window [app_id="^.*"] inhibit_idle fullscreen 
[–] Static_Rocket@lemmy.world 8 points 13 hours ago* (last edited 13 hours ago) (1 children)

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 4 points 6 hours ago

Nice, I didn't know about the all selector

[–] marathon01@lemmy.ml 4 points 20 hours ago* (last edited 20 hours ago)

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

[–] hallettj@leminal.space 5 points 1 day ago* (last edited 1 day ago) (1 children)

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 1 points 20 hours ago

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!

[–] JustineSmithies@lemmy.world 3 points 1 day ago

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