How to prevent DPMS from activating when a full-screen window is open

dpmswinexorg

I am generally quite happy with DPMS screen blanking but for one (rather annoying situation): when playing a game through Wine with a gamepad the screen blanks after a while.
I guess that in this case button presses on the gamepad don't get recognised by Xorg (keyboard presses prevent DPMS from activating, as expected).

I know that in this case I could resort to some kind of hack, like a wrapper script that disables DPMS through xset before running wine (and re-enables it afterwards), but I would like to know if there are better solutions.

Note: I am running XMonad on ArchLinux, in case this might be relevant.

Best Answer

I use a bash script named lightsOn.sh for preventing dpms and screensaver when watching videos fullscreen. This may also work for you even though you will have to adapt it to detect your game process. But the script is well documented.

See here: https://bbs.archlinux.org/viewtopic.php?id=130447

Related Question