summaryrefslogtreecommitdiffstats
path: root/sxhkd
diff options
context:
space:
mode:
authorAmin Bandali <me@aminb.org>2015-03-19 14:49:06 -0400
committerAmin Bandali <me@aminb.org>2015-03-19 14:49:06 -0400
commita8a12804dd43b4f8b91df3dac65f896f1e467f53 (patch)
tree30ca3aba563ce84a8808be838803678dc8744200 /sxhkd
parent269c287ec4dd1dd6e4acdcebdcd614f6985bec99 (diff)
downloadconfigs-a8a12804dd43b4f8b91df3dac65f896f1e467f53.tar.gz
configs-a8a12804dd43b4f8b91df3dac65f896f1e467f53.tar.xz
configs-a8a12804dd43b4f8b91df3dac65f896f1e467f53.zip
[sxhkd] shortcut for [dis/en]abling the touchpad
can disable the touchpad and hide the pointer requires synclient for disabling the touchapd and unclutter for hiding the mouse
Diffstat (limited to '')
-rw-r--r--sxhkd/.config/sxhkd/sxhkdrc3
-rwxr-xr-xsxhkd/.local/bin/toggle-mouse11
2 files changed, 14 insertions, 0 deletions
diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc
index aaf37e4..13734ef 100644
--- a/sxhkd/.config/sxhkd/sxhkdrc
+++ b/sxhkd/.config/sxhkd/sxhkdrc
@@ -140,3 +140,6 @@ XF86AudioMute
XF86LaunchA
toggle-layout
+
+XF86LaunchB
+ toggle-mouse
diff --git a/sxhkd/.local/bin/toggle-mouse b/sxhkd/.local/bin/toggle-mouse
new file mode 100755
index 0000000..906fdbb
--- /dev/null
+++ b/sxhkd/.local/bin/toggle-mouse
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+touchpad_off="$(synclient -l | grep TouchpadOff | cut -d'=' -f 2 | xargs)"
+
+if [ "$touchpad_off" = "0" ]; then
+ synclient TouchpadOff=1
+ unclutter -idle 1 &
+else
+ synclient TouchpadOff=0
+ killall unclutter
+fi