diff options
Diffstat (limited to 'dot')
-rwxr-xr-x | dot/local/bin/thinkfix.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dot/local/bin/thinkfix.sh b/dot/local/bin/thinkfix.sh new file mode 100755 index 0000000..fec6278 --- /dev/null +++ b/dot/local/bin/thinkfix.sh | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/bin/bash | ||
2 | sensitivity=128 | ||
3 | speed=97 | ||
4 | |||
5 | sensitivity=128 | ||
6 | speed=50 | ||
7 | |||
8 | die() { echo "Error: $*" >&2; exit 1; } | ||
9 | |||
10 | [ "$UID" = 0 ] || | ||
11 | exec sudo -- "$0" "$@" || | ||
12 | die "you are not root and sudo failed to become root" | ||
13 | |||
14 | #device=/sys/devices/platform/i8042/serio1/serio2 | ||
15 | device=$(find /sys/devices/platform/i8042/ -name sensitivity -print -a -quit) && | ||
16 | [ "$device" ] || die "could not find i8042 device" | ||
17 | device=${device%/*} | ||
18 | |||
19 | for v in sensitivity speed | ||
20 | do | ||
21 | echo ${!v} > $device/$v | ||
22 | done | ||