Browse Source

Add touchscreen toggle script, change scripts to be POSIX compliant

master
Riyyi 7 years ago
parent
commit
1f370d0aaa
  1. 2
      .config/i3/config
  2. 6
      .scripts/wm/brightness.sh
  3. 2
      .scripts/wm/lock.sh
  4. 11
      .scripts/wm/touchscreen.sh
  5. 2
      .scripts/wm/volume.sh
  6. 1
      README.md

2
.config/i3/config

@ -202,6 +202,8 @@ bindsym $mod+F2 exec xbacklight -dec 10 && pkill -RTMIN+2 i3blocks
bindsym --release Print exec scrot -e "mv \$f $HOME/Pictures/screen_captures/" # Fullscreen bindsym --release Print exec scrot -e "mv \$f $HOME/Pictures/screen_captures/" # Fullscreen
bindsym --release Shift+Print exec scrot -s -e "mv \$f $HOME/Pictures/screen_captures/" # Selection bindsym --release Shift+Print exec scrot -s -e "mv \$f $HOME/Pictures/screen_captures/" # Selection
bindsym --release $mod+Print exec scrot -u -e "mv \$f $HOME/Pictures/screen_captures/" # Focused window bindsym --release $mod+Print exec scrot -u -e "mv \$f $HOME/Pictures/screen_captures/" # Focused window
# Touchscreen toggle
bindsym $mod+F7 exec $HOME/.scripts/wm/touchscreen.sh
# Window appearance # Window appearance
smart_gaps on smart_gaps on

6
.scripts/wm/brightness.sh

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
3) xbacklight -set 30 ;; # right click 3) xbacklight -set 30 ;; # right click
@ -8,9 +8,9 @@ esac
PERCENTAGE=$(printf "%.0f" "$(xbacklight)") PERCENTAGE=$(printf "%.0f" "$(xbacklight)")
if (( $PERCENTAGE >= 75 )); then if $(( $PERCENTAGE >= 75 )); then
ICON="" ICON=""
elif (( $PERCENTAGE >= 25 )); then elif $(( $PERCENTAGE >= 25 )); then
ICON="" ICON=""
else else
ICON="" ICON=""

2
.scripts/wm/lock.sh

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
ICON="$HOME/Pictures/lock.png" ICON="$HOME/Pictures/lock.png"
TMPBG='/tmp/screen.png' TMPBG='/tmp/screen.png'

11
.scripts/wm/touchscreen.sh

@ -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

2
.scripts/wm/volume.sh

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
# default (ALSA), pulse, jack # default (ALSA), pulse, jack
MIXER="pulse" MIXER="pulse"

1
README.md

@ -85,6 +85,7 @@ All packages that are manually installed via pacman -S, dependencies not include
python2-click-5.1 (AUR) python2-click-5.1 (AUR)
platformio (AUR) platformio (AUR)
vim vim
checkbashisms (AUR)
### Configuration: ### Configuration:

Loading…
Cancel
Save