patrick-motard / dotfiles

My dotfiles
The Unlicense
19 stars 8 forks source link

Automatically sleep the monitor after a timeout, after locking the screen #98

Closed amasover closed 5 years ago

amasover commented 6 years ago

This lock script still has some issues, but it's an early crack at trying to sleep the monitor when the user walks away from the computer.

For some reason the xset dpms from .xinitrc wasn't working for me. I think it had something to do with stuff like listening to music causing X to think that there was still user activity. In my new lock script, I use xprintidle which seems to do a better job (though there are still some issues).

My script involves launching the lock process, and then a second process in parallel that turns off the screen after a timeout. It's not as clean as the xset dpms in .xinitrc, but at least it actually seems to work for me (most of the time).