pmaports/device/community/device-nokia-n900/lock.sh
Sicelo A. Mhlongo a787222aeb
postmarketos-ui-i3wm: use tinydm and relocate device-specific file (MR 3769)
* lock.sh is specific to Nokia N900, so move to device-nokia-n900
* use tinydm instead of lightdm

Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
[ci:skip-build]: already built successfully in CI
2022-12-29 17:57:38 +01:00

14 lines
291 B
Bash

#!/bin/sh
FILE=~/.screenoff
if [ -f $FILE ]; then
xinput set-prop 8 "Device Enabled" 1
xset dpms force on
rm "$FILE"
else
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"
fi