summaryrefslogtreecommitdiff
path: root/script/usbmouse
blob: c2f0dbe918b10403ea8631b291f6cf7ef1b041bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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