Background
For some reason, X11 / lightdm crashes when pressing the monitor's power button. Instead, running xset dpms force off puts the monitor into low-power mode, which is fine and works around pressing the problematic power button.
Running Arch Linux.
Problem
After pressing a key to switch the monitor back for work, the screen will go blank when the computer is idle for several minutes. I'd like to disable that behaviour.
Question
How would you write a bash alias (e.g., off) that:
- Turns the monitor "off" (lower power mode).
- Ensures no screen blanking or timeouts after re-enabling the monitor.
For example:
alias off='xset dpms force off ; wait until keypress ; xset -dpms'
Is there a simpler solution?