Fix issues with lock.sh for i3wm/N900 (#1439)

This commit is contained in:
Sicelo 2018-04-23 23:04:31 +02:00 committed by Oliver Smith
parent d6391791f7
commit e6e4682180
2 changed files with 9 additions and 7 deletions

View File

@ -1,6 +1,6 @@
pkgname=postmarketos-ui-i3wm
pkgver=0.1
pkgrel=0
pkgrel=1
pkgdesc="(X11) Tiling WM (keyboard required)"
url="https://i3wm.org"
arch="noarch"
@ -16,8 +16,8 @@ source="
options="!check"
package() {
install -D -m644 "$srcdir"/lock.sh \
install -D -m755 "$srcdir"/lock.sh \
"$pkgdir"/usr/bin/lock.sh
}
sha512sums="f1556fa83ddecf453333d784004c28d6bd9b7cf4c5ee2c0d31d51e67f5e1fa9949a6dd4377793eeb72e619add0689208fdd497924ebefa778c349a26e57ad30a postmarketos-ui-i3wm.post-install
ae41416dc56751825a87024dfe145afcba80a1aba5152280f199dfb3f289626fc8ec6ad38d0f25b7b5e5e74edde1d560e01c71251040d195da47214c4068c702 lock.sh"
2165141499a830beb33ee42e410ba39104f3e70cd61507f0607115d421846104659fa7e9d4193b3394f7384fc33c2233269bb61c99d5d8a2368aa83500e54b35 lock.sh"

View File

@ -1,12 +1,14 @@
#!/bin/sh
FILE=~/tmp/screenoff
FILE=~/.screenoff
if [ -f $FILE ]; then
xinput set-prop 8 "Device Enabled" 1
xset dpms force on
rm ~/.screenoff
rm "$FILE"
else
xset dpms force off
xinput set-prop 8 "Device Enabled" 0
touch ~/.screenoff
# Turn screen off twice (sometimes it does not work on first run)
xset dpms force off
xset dpms force off
touch "$FILE"
fi