[ADD][I3] Touchpad toggle & display settings keys

This commit is contained in:
Bruno BELANYI 2019-07-17 17:41:46 +02:00
parent b158a8a06e
commit b03a14ba63
2 changed files with 15 additions and 0 deletions

View file

@ -209,6 +209,10 @@ bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks
bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+10 i3blocks
bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+10 i3blocks
bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+10 i3blocks
# Bind keyboard settings key to toggle touchpad
bindsym XF86Tools exec toggle_touchpad
# Bind display control to launch arandr
bindsym XF86Display exec arandr
# Bind sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 10

11
scripts/toggle_touchpad Executable file
View file

@ -0,0 +1,11 @@
#! /bin/sh
# Device id according to xinput list
device=11
state=$(xinput list-props "$device" | grep "Device Enabled" | grep -o "[01]$")
if [ "$state" == "1" ];then
xinput --disable "$device"
else
xinput --enable "$device"
fi