droid4-sys

Droid4 tools
git clone git://parazyd.org/droid4-sys.git | https://git.parazyd.org/droid4-sys
Log | Files | Refs | LICENSE

commit 212616218e586323ee4804d17e4def1d5f1e4a58
parent 058568a127de947cfa15b46ea8acb3f45d043302
Author: parazyd <parazyd@dyne.org>
Date:   Thu, 23 May 2019 02:14:15 +0200

Rework powerkey and add monoff.

Diffstat:
MMakefile | 4+++-
Amonoff | 3+++
Mpowerkey | 30+++++++++++++++++-------------
3 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile @@ -3,7 +3,9 @@ include config.mk BIN = backlight -SCR = powerkey +SCR = \ + powerkey \ + monoff OBJ = $(BIN:=.o) all: $(BIN) diff --git a/monoff b/monoff @@ -0,0 +1,3 @@ +#!/bin/sh +export DISPLAY=:0 +xset dpms force off diff --git a/powerkey b/powerkey @@ -1,15 +1,19 @@ #!/bin/sh -state="$(cat /tmp/droid4-status)" -case "$state" in -on) - backlight -l off - #backlight -k off - echo off > /tmp/droid4-status - ;; -off) - backlight -l on - #backlight -k on - echo on > /tmp/droid4-status - ;; -esac +export DISPLAY=:0 +xset dpms force off +slock + +#state="$(cat /tmp/droid4-status)" +#case "$state" in +#on) +# backlight -l off +# #backlight -k off +# echo off > /tmp/droid4-status +# ;; +#off) +# backlight -l on +# #backlight -k on +# echo on > /tmp/droid4-status +# ;; +#esac