diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-06-29 09:06:47 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-06-29 09:06:47 -0300 |
commit | 432a8e5f67b17a3c1d95ee5803cb747f950b57ee (patch) | |
tree | 5668fa001af1dfc92b348175e21eaf4525b3102b | |
parent | b5671afebb3a90405b0fa4829e0fe654a4697928 (diff) | |
download | utils-x11-432a8e5f67b17a3c1d95ee5803cb747f950b57ee.tar.gz utils-x11-432a8e5f67b17a3c1d95ee5803cb747f950b57ee.tar.bz2 |
Fix: xlock
-rwxr-xr-x | xlock | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -5,18 +5,19 @@ # Get current focused window # Some screen lockers such as i3lock loose the window focus -WINDOW="`xdotool getwindowfocus`" +#WINDOW="`xdotool getwindowfocus`" + +# See https://www.kirsle.net/turn-off-monitor-from-linux-cli +# https://askubuntu.com/questions/62858/turn-off-monitor-using-command-line#62861 +xset dpms force off +sleep 1 # Using xscreensaver #xscreensaver-command --lock # Using i3lock -i3lock -c 1c1c1c - -# See https://www.kirsle.net/turn-off-monitor-from-linux-cli -# https://askubuntu.com/questions/62858/turn-off-monitor-using-command-line#62861 -sleep 1 -xset dpms force off +# Ensure it is not forked or we might loose window focus after unlocking +i3lock -c 1c1c1c -n # Restore focus -xdotool windowfocus $WINDOW +#xdotool windowfocus $WINDOW |