0 Replies - 1098 Views - Last Post: 04 January 2010 - 11:10 AM

#1 code_m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 24
  • View blog
  • Posts: 202
  • Joined: 21-April 09

Trackpad Software Toggle

Posted 04 January 2010 - 11:10 AM

Description: Simply save the script (not including the commented lines, this is two scripts, see below) somewhere in your path, /sbin/trackpad_toggle.sh would make sense. Make sure to make it executable (chmod "+x" FILENAME).

Then add it to your keybinding software, xbindkeys works wonders here if you have trouble getting your Desktop Enviroment to do it (Gnome, KDE, Xfce4). I suggest some simple like cntl+shift+space, so that way whenever your typing you can just hit that combo first.

If the script doesn't work for you it's because your not using the "synaptics" driver, on my system this required getting a package named "xf86-input-synaptics", it may be different for you. I recommend getting this driver, as it can do some special things like take advantage of multi-touch pads, and circular scrolling. If you cannot find this, try using the commented lines instead, as this uses modules to do it's work, of course this will require root permissions, so adding your script to sudo will help you a lot.Two bash scripts that toggle your trackpad on/off. Extremely useful, and gives you a lot of control !
#!/bin/bash

if [ `synclient -l | grep TouchpadOff | gawk -F '= ' '{ print $2 }'` -eq 0 ]; then
    synclient TouchpadOff=1
else
    synclient TouchpadOff=0
fi

##!/bin/bash
#
#if [ -n "`lsmod | grep psmouse`" ]; then
#    rmmod psmouse
#else
#    modprobe psmouse
#fi


Is This A Good Question/Topic? 0
  • +

Page 1 of 1