toggle synaptics touchpad
This commit is contained in:
parent
e82682fd7a
commit
c2b8a0b8fe
1 changed files with 16 additions and 0 deletions
16
toggle-touchpad.sh
Executable file
16
toggle-touchpad.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
declare -i ID
|
||||
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
|
||||
declare -i STATE
|
||||
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
|
||||
if [ $STATE -eq 1 ]
|
||||
then
|
||||
xinput disable $ID
|
||||
# echo "Touchpad disabled."
|
||||
# notify-send -a 'Touchpad' 'Disabled' -i /usr/share/icons/Adwaita/48x48/devices/input-touchpad.png
|
||||
else
|
||||
xinput enable $ID
|
||||
# echo "Touchpad enabled."
|
||||
# notify-send -a 'Touchpad' 'Enabled' -i /usr/share/icons/Adwaita/48x48/devices/input-touchpad.png
|
||||
fi
|
Loading…
Reference in a new issue