summaryrefslogtreecommitdiff
path: root/x11/xprofile.T495
blob: fe624024c1b21f72d8e68254c0eb608d9de241c3 (plain)
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
#!/bin/sh
# xinput --list
# xinput --list-props <device>
# xinput --set-prop <device> <prop> <value>
xinput --set-prop "TPPS/2 Elan TrackPoint"     "libinput Accel Speed"                  -0.5  # make trackpoint accelerate less
xinput --set-prop "SynPS/2 Synaptics TouchPad" "libinput Accel Speed"                   0.3  # make trackpad accelerate more
xinput --set-prop "SynPS/2 Synaptics TouchPad" "libinput Disable While Typing Enabled"  0    # don't disable trackpad while typing

# docking station
if xrandr | grep "HDMI-1 connected 3840x2160" > /dev/null; then
	xrdb -merge $X11CONFIG/Xresources.desktop 2>/dev/null & xrdbpid=$!
	input-leaps --config "$XDG_CONFIG_HOME/input-leap/input-leap.conf" --disable-crypto &

	# make HDMI-A-0 the primary display
	xrandr --output HDMI-A-0 --primary

	# disable laptop screen
	xrandr --output eDP --off

	# set dp from docking station to 3840x2160@29.98hz since doesn't output in 60hz mode for some reason
	dpdisplay="$(xrandr | grep -E 'DisplayPort-[0-9]+ connected' | grep -o 'DisplayPort-.')"
	[ -n "$dpdisplay" ] && xrandr --output "$dpdisplay" --mode 3840x2160 --rate 29.98 --right-of "HDMI-A-0"

	wait $xrdbpid # wait for xrdb like in base xprofile
fi