config/bin/watch-screen

14 lines
227 B
Plaintext
Raw Normal View History

2020-05-14 20:03:55 +02:00
#!/bin/bash
xset s 300
xset dpms 300 450 600
while true; do
sleep 1s;
if [ "$(xset q | grep 'Monitor is' | grep -v 'On' 2> /dev/null)" != "" ]; then
if [ "$(ps aux | grep '[i]3lock')" == "" ]; then
lock;
fi
fi
done