Re: KUDOS: Turn off touchpad in Linux Mint
Seth David Schoen <[email protected]>
| Newsgroups | gmane.org.user-groups.linux.svlug |
|---|---|
| Message-ID | <[email protected]> |
Steve Litt writes:
> And here's my shellscript, called "touchtoggle", which I associate with
> an easy hotkey on every laptop I own:
>
> ===================================================
> #!/bin/sh
>
> curstate=`synclient | grep -i TouchpadOff | sed -e"s/.*= //"`
> if test "$curstate" = "1"; then
> synclient TouchpadOff=0
> else
> synclient TouchpadOff=1
> fi
> ===================================================
Interestingly, my ThinkPad has the state
TouchpadOff = 2
According to synaptics(4), this means "Only tapping and scrolling is
switched off" (where apparently the touchpad can still be used to move
the mouse pointer). Strangely, my laptop actually behaves as though
the setting were 0 instead of 2.
Since your script is based on looking for a particular fixed string in
the command output, you could probably simplify it to do
if synclient | grep TouchpadOff.*1 > /dev/null; then
--
Seth David Schoen <[email protected]> | No haiku patents
http://www.loyalty.org/~schoen/ | means I've no incentive to
8F08B027A5DB06ECF993B4660FD4F0CD2B11D2F9 | -- Don Marti