summaryrefslogtreecommitdiff
path: root/script/usbmouse
blob: 8ace69c516c82fb9db79a104ced7ecf25de8ca53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
while true
do
    if [ -e ~/.touchpad.on ]; then 
        synclient TouchpadOff=0
    else
        if [ -e ~/.touchpad.off ]; then 
            synclient TouchpadOff=1
        else
            if [ "`grep -e Mouse /proc/bus/usb/devices`" ]; then
                synclient TouchpadOff=1
            else
                synclient TouchpadOff=0
            fi
        fi
    fi  
    sleep 3
done