You are not logged in.
Pages: 1
I was searching for a way to toggle my touchpad on and off...
I found this thread, which didn't solve it for me...
http://crunchbanglinux.org/forums/topic … -touchpad/
So i made a small script toggletouchpad.sh
#!/bin/bash
if [ $(synclient -l | grep TouchpadOff | awk '{print $3}') == 1 ] ; then
synclient touchpadoff=0;
else
synclient touchpadoff=1;
fiIn rc.xml i assigned the program to Winkey-p:
<keybind key="W-p">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>toggletouchpad</name>
</startupnotify>
<command>toggletouchpad.sh</command>
</action>
</keybind>If there's a better way to do this, please let me know...
Tuna
sed 's/stress/relaxation/g'
Privacy & Security on #!
Offline
On my Toshiba the touchpad has a nasty habit of re-enabling itself, so I use the more durable approach of unloading the psmouse module:
#!/bin/sh
if xinput list-props "SynPS/2 Synaptics TouchPad" | grep "Device Enabled" | grep 1 > /dev/null 2>&1
then
modprobe -r psmouse > /dev/null 2>&1
echo "Touchpad disabled"
else
modprobe psmouse > /dev/null 2>&1
echo ""
echo "Touchpad now enabled"
fiOf course you need root permission to use modprobe, but that isn't a problem since I always have a root shell open.
Last edited by Penguin Skinner (2011-01-09 16:16:27)
Offline
Of course you need root permission to use modprobe, but that isn't a problem since I always have a root shell open.
I wanted something without root permission (so i could use it with openbox keybindings). And i didn't want to add modprobe to the sudoers file.
I didn't experience the re-enabling problem yet....
Tuna
sed 's/stress/relaxation/g'
Privacy & Security on #!
Offline
I didn't experience the re-enabling problem yet....
Tuna
Hope you don't! It's unbelievably annoying to be typing along and suddenly there's mayhem on your desktop. 
Offline
Hope you don't! It's unbelievably annoying to be typing along and suddenly there's mayhem on your desktop.
I actually had a different reason for this small script. I have a on/off switch on my touchpad, so i can switch it off when i'm not using it. The problem is when i switch it on, it sends a repeating equal sign =================================== which only stops when i press enter.
sed 's/stress/relaxation/g'
Privacy & Security on #!
Offline
As i experienced the same problem as Penquin Skinner, i now use a different method:
#!/bin/bash
if [ $(xinput list-props "AlpsPS/2 ALPS GlidePoint" | grep "Device Enabled" | awk '{print $4}') -eq 1 ]; then
#if [ $(synclient -l | grep TouchpadOff | gawk -F '= ' '{ print $2 }') -eq 0 ]; then
#synclient TouchpadOff=1
xinput set-int-prop "AlpsPS/2 ALPS GlidePoint" "Device Enabled" 8 0
notify-send "touchpad disabled"
else
#synclient TouchpadOff=0
xinput set-int-prop "AlpsPS/2 ALPS GlidePoint" "Device Enabled" 8 1
notify-send "touchpad enabled"
fiThis seems to work... (till now)
Tuna
sed 's/stress/relaxation/g'
Privacy & Security on #!
Offline
I had the same problem and I first tried to use syndaemon, but it would disable two-finger tap which I use for root window menu, so now when I type a lot I just unload mouse drivers module (I had a couple of free fn keys on my laptop) and it works like charm. And it makes me use more vim commands and keeps me away from random browsing the web. Love this option. ))
Offline
What about if everything works initially, but just "dies" after switching the touchpad on/off?
Offline
Here's the one I use. It's pretty similar
#!/bin/bash
# toggle touchpad on and off on asus 1015pem
# based on one by sg3524 and c901906 at
# ubuntu forums "elantech touchpad improperly recognized ..."
#
#
# use 'xinput list' and 'xinput list-props' to find
# the correct local value for $PAD
PAD='ETPS/2 Elantech Touchpad'
A=`xinput list-props "$PAD" | sed -n -e 's/.*Device Enabled ([0-9][0-9]*):\t\(.*\)/\1/p' `
# echo "A =" $A
if [ $A -eq 1 ]; then
xinput set-int-prop "$PAD" "Device Enabled" 8 0
else
xinput set-int-prop "$PAD" "Device Enabled" 8 1
fiOffline
I have aliases set up to disable mine.
alias mouseon='sudo modprobe psmouse'
alias mouseoff='sudo modprobe -r psmouse'
but this is for a Google cr48.
My problem is with enabled the tap feature instead of a hard click, but the multi-touch for scrolling works out of the box. If only the tap feature would work I would have a perfect #! setup on a Google Chrome cr48, with a flashed intel bios 
Offline
seeing how we're reviving the thread for a bit, the least i can do is post a link to my own how-to for disabling your synaptics touchpad when an USB-mouse is connected: http://crunchbanglinux.org/forums/topic … connected/
Offline
Pages: 1
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.