pmaports/device/community/device-nokia-n900/lock.sh
Sicelo A. Mhlongo 4ac671b055
device-nokia-n900: switch to more robust locking script (MR 4988)
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>
2024-04-03 07:57:51 +02:00

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