2018-02-20 11:21:03 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-04-23 23:04:31 +02:00
|
|
|
FILE=~/.screenoff
|
2018-02-20 11:21:03 +01:00
|
|
|
if [ -f $FILE ]; then
|
2022-10-14 04:46:40 -07:00
|
|
|
xinput set-prop 8 "Device Enabled" 1
|
|
|
|
xset dpms force on
|
|
|
|
rm "$FILE"
|
2018-02-20 11:21:03 +01:00
|
|
|
else
|
2022-10-14 04:46:40 -07:00
|
|
|
xinput set-prop 8 "Device Enabled" 0
|
|
|
|
# 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 11:21:03 +01:00
|
|
|
fi
|