5

I use synclient touchpadoff=1 to disable touchpad and synclient touchpadoff=0 to enable touchpad.

$synclient | grep TouchpadOff
    TouchpadOff             = 1

I'd like to create script that will toggle this value. Then I will bind to key in OpenBox.

kravemir
  • 4,014
  • 4
  • 33
  • 48

1 Answers1

8

How about:

if synclient -l | egrep "TouchpadOff.*= *0" ; then 
    synclient TouchpadOff=1 ; 
else 
    synclient TouchpadOff=0 ; 
fi

For reference a third setting, TouchpadOff = 2, disables only tapping.


Or a one-liner:

synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*0')

References:

Cas
  • 103
  • 7
January
  • 1,877
  • 2
  • 16
  • 14