summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2016-01-25 12:57:35 +0000
committerUrbain Vaes <urbain@vaes.uk>2016-01-25 12:57:35 +0000
commitc991381d6e6d62ef475bcd7d533cbf0b26656aaa (patch)
tree858476187629febdb020707ca9674463d2e1fe95
parent0e54dbcaeb3f20c9e189a7d10e24f3676284795d (diff)
Add key to disable touchpad
-rw-r--r--.i3/config3
-rwxr-xr-xbin/touchpad9
2 files changed, 12 insertions, 0 deletions
diff --git a/.i3/config b/.i3/config
index 408336e..d0e9a54 100644
--- a/.i3/config
+++ b/.i3/config
@@ -181,6 +181,9 @@ bindsym XF86AudioMute exec amixer -D pulse sset Master 0%
bindsym XF86MonBrightnessUp exec light -A 10
bindsym XF86MonBrightnessDown exec light -U 10
+# Disable touchpad
+bindsym XF86AudioPlay exec $HOME/bin/touchpad
+
# font pango:DejaVu Sans Mono 10
bindsym F1 exec --no-startup-id feh --bg-fill --randomize /usr/share/backgrounds
bindsym $mod+semicolon exec --no-startup-id $HOME/bin/run
diff --git a/bin/touchpad b/bin/touchpad
new file mode 100755
index 0000000..17649fa
--- /dev/null
+++ b/bin/touchpad
@@ -0,0 +1,9 @@
+#! /usr/bin/env bash
+
+# Touchpad status
+status=$(synclient -l | grep TouchpadOff)
+if [[ $status = *1 ]]; then
+ synclient TouchpadOff=0
+elif [[ $status = *0 ]]; then
+ synclient TouchpadOff=1
+fi