From e371d9edd474bcf89cf5d462eaccb8638900b390 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 3 Oct 2020 19:27:15 -0400 Subject: Initial commit --- .local/bin/trackpadtoggle | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .local/bin/trackpadtoggle (limited to '.local/bin/trackpadtoggle') 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 + -- cgit v1.2.3