Just a short script I wrote to disable my mouse to get me into better workflow habits - Programming On Unix

Users browsing this thread: 1 Guest(s)
xero
Long time nixers
here's my toggle touch pad script:

Code:
#!/bin/sh
#
# 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


Messages In This Thread
RE: Just a short script I wrote to disable my mouse to get me into better workflow habits - by xero - 06-05-2015, 12:17 PM