summaryrefslogtreecommitdiff
path: root/.local/bin/trackpadtoggle
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/trackpadtoggle')
-rwxr-xr-x.local/bin/trackpadtoggle15
1 files changed, 15 insertions, 0 deletions
diff --git a/.local/bin/trackpadtoggle b/.local/bin/trackpadtoggle
new file mode 100755
index 0000000..4bf01ae
--- /dev/null
+++ b/.local/bin/trackpadtoggle
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Give this the 1 argument to activate the Trackpad.
+# Give this 0 to disable it.
+
+input="$1"
+
+xinput --set-prop 12 "Device Enabled" $input
+
+case "$input" in
+ 0) notify-send -i "$HOME/.fonts/svg/mouse-pointer.svg" -a Trackpad "Trackpad successfully disabled" ;;
+ 1) notify-send -i "$HOME/.fonts/svg/mouse-pointer.svg" -a Trackpad "Trackpad successfully enabled" ;;
+ *) notify-send -i "$HOME/.fonts/svg/mouse-pointer.svg" -a Trackpad "Error" ;;
+esac
+