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
|
2022-10-14 11:46:40 +00:00
|
|
|
xinput set-prop 8 "Device Enabled" 1
|
|
|
|
xset dpms force on
|
|
|
|
rm "$FILE"
|
2018-02-20 10:21:03 +00:00
|
|
|
else
|
2022-10-14 11:46:40 +00: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 10:21:03 +00:00
|
|
|
fi
|