Add touchscreen toggle script, change scripts to be POSIX compliant

This commit is contained in:
Riyyi
2018-01-08 15:47:53 +01:00
parent 83538cede1
commit 1f370d0aaa
6 changed files with 19 additions and 5 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
case $BLOCK_BUTTON in
3) xbacklight -set 30 ;; # right click
@@ -8,9 +8,9 @@ esac
PERCENTAGE=$(printf "%.0f" "$(xbacklight)")
if (( $PERCENTAGE >= 75 )); then
if $(( $PERCENTAGE >= 75 )); then
ICON=""
elif (( $PERCENTAGE >= 25 )); then
elif $(( $PERCENTAGE >= 25 )); then
ICON=""
else
ICON=""
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
ICON="$HOME/Pictures/lock.png"
TMPBG='/tmp/screen.png'
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
device="04F3200A:00 04F3:2373"
state=$(xinput --list-props "$device" | grep "Device Enabled" | sed -nr 's/.*:\t([0-9])/\1/p')
if [ "$state" = "0" ]; then
xinput set-prop "$device" 140 1
else
xinput set-prop "$device" 140 0
fi
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# default (ALSA), pulse, jack
MIXER="pulse"