-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetmode
40 lines (27 loc) · 1.16 KB
/
setmode
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
#set -x
tablet(){
xrandr --output eDP-1 --rotate inverted
xinput set-prop 'Logitech USB Optical Mouse' "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1
xinput set-prop 'Wacom Pen and multitouch sensor Finger touch' "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1
xinput set-prop 'Wacom Pen and multitouch sensor Pen stylus' "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1
xinput set-prop 'SynPS/2 Synaptics TouchPad' "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1
}
laptop(){
xrandr --output eDP-1 --rotate normal
xinput set-prop 'Logitech USB Optical Mouse' "Coordinate Transformation Matrix" 1 0 1 0 1 1 0 0 1
xinput set-prop 'Wacom Pen and multitouch sensor Finger touch' "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
xinput set-prop 'Wacom Pen and multitouch sensor Pen stylus' "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
xinput set-prop 'SynPS/2 Synaptics TouchPad' "Coordinate Transformation Matrix" 1 0 1 0 1 1 0 0 1
}
case "$1" in
'tablet')
tablet
;;
'laptop')
laptop
;;
*)
laptop #be on the safe side...
echo "usage setmode (laptop|tablet)"
esac