2018-02-20 10:21:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-04-23 21:04:31 +00:00
|
|
|
FILE=~/.screenoff
|
2018-02-20 10:21:03 +00:00
|
|
|
if [ -f $FILE ]; then
|
|
|
|
xinput set-prop 8 "Device Enabled" 1
|
|
|
|
xset dpms force on
|
2018-04-23 21:04:31 +00:00
|
|
|
rm "$FILE"
|
2018-02-20 10:21:03 +00:00
|
|
|
else
|
|
|
|
xinput set-prop 8 "Device Enabled" 0
|
2018-04-23 21:04:31 +00:00
|
|
|
# Turn screen off twice (sometimes it does not work on first run)
|
|
|
|
xset dpms force off
|
|
|
|
xset dpms force off
|
|
|
|
touch "$FILE"
|
2018-02-20 10:21:03 +00:00
|
|
|
fi
|