added send to device shell script.
[my-dotfiles.git] / wacomsetter.sh
... / ...
CommitLineData
1#! /bin/bash
2if $(xsetwacom list devices > /dev/null); then
3 for i in $(seq 10); do
4 if xsetwacom list devices | grep -q Wacom; then
5 break
6 fi
7 sleep 1
8 done
9fi
10
11list=$(xsetwacom list devices)
12pad=$(echo "${list}" | awk '/pad/{print $8}')
13stylus=$(echo "${list}" | xsetwacom list devices | awk '/stylus/{print $8}')
14
15if [ -z "${pad}" ]; then
16 exit 0
17fi
18
19### TABLET SETTINGS ###
20# bottom left
21xsetwacom set $pad Button 1 "key +ctrl z -ctrl"
22# top left
23xsetwacom set $pad Button 3 "key +ctrl y -ctrl"
24# bottom right
25xsetwacom set $pad Button 8 "key +shift +ctrl s -ctrl -shift"
26# top right
27xsetwacom set $pad Button 9 "key +ctrl s -ctrl"
28
29### PEN SETTINGS ###
30# tip of the pen
31xsetwacom set $stylus Button 1 "Button 1"
32# bottom Button
33xsetwacom set $stylus Button 2 "Button 3"
34# top Button
35xsetwacom set $stylus Button 3 "Button 2"