summaryrefslogtreecommitdiff
path: root/dot/local/bin/ttoggle
blob: 15110e6309ccc6c062861e2c640837086e574be0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

touchdev=$(xinput list --name-only|grep touch) || exit

touchdev_enabled()
{
    xinput list-props "$touchdev" | grep -q '(148):.1$'
}

if touchdev_enabled
then
    cmd=disable
else
    cmd=enable
fi

set -x
xinput "$cmd" "$touchdev"