4ac671b055
This is an adaptation of craftguy's improved script [1] [1] https://gitlab.com/postmarketOS/pmaports/-/tree/n900-screen-locker Co-authored-by: Clayton Craft <clayton@craftyguy.net>
17 lines
247 B
Bash
17 lines
247 B
Bash
#!/bin/sh
|
|
|
|
display=off
|
|
if xset q | grep -iq "monitor is on"; then
|
|
display=on
|
|
fi
|
|
|
|
case "$display" in
|
|
off)
|
|
xinput enable "TSC2005 touchscreen"
|
|
xset dpms force on
|
|
;;
|
|
on)
|
|
xinput disable "TSC2005 touchscreen"
|
|
xset dpms force off
|
|
;;
|
|
esac
|