Automatically inhibiting lock/sleep under certain conditions

Is there a great way to inhibit lock/sleep or extend the timeout under certain conditions? For example, if a fullscreen app is running, a certain process is active, or if a video/song is playing? I realize this question might be me just not being very familiar with KDE itself. I was watching a cutscene in a game running under Wine in fullscreen mode and the 5mn lock screen interrupted it. I stepped away for 15mn and came back to find my PC asleep, disconnecting me from the game and Discord. I'm investigating running a sidecar process with my game to extend the sleep timer with systemd-inhibit, but that would only work for my main game. I'd like this smarter behavior to extend to other programs, like Plex, Spotify, or YouTube in a Firefox tab, but still let the computer aggressively sleep if the machine is truly idle. Other things I've considered are KDE Activites and just manually disabling them myself, but automation is key for a feature that might need to activate for when I step away.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server