-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththinkvantage.sh
More file actions
executable file
·30 lines (25 loc) · 953 Bytes
/
thinkvantage.sh
File metadata and controls
executable file
·30 lines (25 loc) · 953 Bytes
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
#!/bin/bash
screens=$(xrandr | sed -n 's/\(.*\) connected \(.*\)+.*+.* .*$/\1@\2/p' | tr "\n" "," | sed -e 's/,$/\n/')
if [ $screens = "LVDS-0@1920x1080" ]; then
setup="Laptop"
elif [ $screens = "VGA-0@1920x1200,LVDS-0@1920x1080,DP-3@1920x1200" ]; then
setup="Workstation"
fi
# Set up touchpad the way I like it
synclient HorizTwoFingerScroll=1
synclient VertTwoFingerScroll=1
synclient EmulateTwoFingerMinW=1000
synclient EmulateTwoFingerMinZ=1000
synclient VertEdgeScroll=0
synclient HorizEdgeScroll=0
xinput set-button-map 'SynPS/2 Synaptics TouchPad' 1 2 3 5 4 7 6
if [ $setup = "Laptop" ]; then
xrandr --output VGA-0 --off --output DP-3 --off
xrandr --output LVDS-0 --auto
elif [ $setup = "Workstation" ]; then
xrandr --output DP-3 --auto
xrandr --output LVDS-0 --off
xrandr --output VGA-0 --auto
xrandr --output DP-3 --rotate left --output VGA-0 --rotate right --left-of VGA-0
fi
notify-send -i desktop "Setup Changed" $setup