From 2f52a22248e9000f0304a7fb7f8a3ec2832f3689 Mon Sep 17 00:00:00 2001 From: Sicelo Date: Mon, 23 Apr 2018 23:04:31 +0200 Subject: [PATCH] Fix issues with lock.sh for i3wm/N900 (#1439) --- main/postmarketos-ui-i3wm/APKBUILD | 6 +++--- main/postmarketos-ui-i3wm/lock.sh | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/main/postmarketos-ui-i3wm/APKBUILD b/main/postmarketos-ui-i3wm/APKBUILD index 119be9a0b..50c35ad1a 100644 --- a/main/postmarketos-ui-i3wm/APKBUILD +++ b/main/postmarketos-ui-i3wm/APKBUILD @@ -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" diff --git a/main/postmarketos-ui-i3wm/lock.sh b/main/postmarketos-ui-i3wm/lock.sh index 7b3bb4b2c..0e23ecc12 100644 --- a/main/postmarketos-ui-i3wm/lock.sh +++ b/main/postmarketos-ui-i3wm/lock.sh @@ -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