Bug 504838 - New window rule - prevent [sleep / screen off / dimming] while application is [running / open / focused]
Summary: New window rule - prevent [sleep / screen off / dimming] while application is...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (other bugs)
Version First Reported In: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-26 20:15 UTC by Nikoichu
Modified: 2025-05-26 20:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoichu 2025-05-26 20:15:26 UTC
A very useful rule would be one that prevents power-saving features (screen dimming / screen switch off / sleep) while the window/application it's set for is:
-RUNNING (as a process, could be in the tray, or minimized),
or OPEN (the program should not be minimized, should be visible on the screen, even if not focused or under other windows),
or FOCUSED (prevent power-saving only while this window is in focus)

Ideally, it should be customizable to let you select the level of power saving allowed in a dropdown menu. Here is how the option might look like: [Things in brackets are dropdowns]

-Prevent [Dimming / Screen off / Sleep] while app is [Focused / Open / Running]

This would be great for many different use cases, for example to prevent sleep while a music player is playing, but to allow the screen to turn off; or to prevent screen off while in a RDP session, but to allow dimming. Or to prevent dimming while playing a game with a controller (they don't count as input and can't wake the PC).