diff options
author | xero <x@xero.nu> | 2014-03-08 22:05:02 -0500 |
---|---|---|
committer | xero <x@xero.nu> | 2014-03-08 22:05:02 -0500 |
commit | b58ff155f74cbe76f51aa0074d8d2218de774613 (patch) | |
tree | c38b8ac4eab2ae476de312e80c8913db8b264334 /code/sys/toggle-touchpad.sh | |
parent | 9ae724da88a69ab938ee1f899949441cb97b84a7 (diff) | |
download | dotfiles_ascii-b58ff155f74cbe76f51aa0074d8d2218de774613.tar.xz dotfiles_ascii-b58ff155f74cbe76f51aa0074d8d2218de774613.zip |
reorganize scripts, and system automation scripts for hybrid graphics, touchpad management, and file comparison
Diffstat (limited to '')
-rwxr-xr-x | code/sys/toggle-touchpad.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/code/sys/toggle-touchpad.sh b/code/sys/toggle-touchpad.sh new file mode 100755 index 0000000..2381a86 --- /dev/null +++ b/code/sys/toggle-touchpad.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# enable/disable touchpad +# find your touchpad name: +# egrep -i 'synap|alps|etps' /proc/bus/input/devices +PAD='SynPS/2 Synaptics TouchPad' +A=`xinput list-props "$PAD" | sed -n -e 's/.*Device Enabled ([0-9][0-9]*):\t\(.*\)/\1/p' ` +if [ $A -eq 1 ]; then +xinput set-int-prop "$PAD" "Device Enabled" 8 0 +notify-send -t 5000 \ +' touchpad +░░▒▒▓▓██▓▓▒▒░░' \ +' disabled' +else +xinput set-int-prop "$PAD" "Device Enabled" 8 1 +notify-send -t 5000 \ +' touchpad +░░▒▒▓▓██▓▓▒▒░░' \ +' enabled' +fi |