summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2024-01-29 16:11:12 -0600
committerTimmy Keller <tjk@tjkeller.xyz>2024-01-29 16:11:12 -0600
commit2b6785401807c3ea2bf29186acb5a196bd2fea5b (patch)
treeffd4e0f28e809ed932598583128cbbaeee752215 /x11
parent00500daa0d8b0824f15a72e9741e2f81686e60db (diff)
downloaddotconfig-2b6785401807c3ea2bf29186acb5a196bd2fea5b.tar.xz
dotconfig-2b6785401807c3ea2bf29186acb5a196bd2fea5b.zip
add docking station functionality to xprofile.T495
Diffstat (limited to 'x11')
-rwxr-xr-xx11/xprofile.T49517
1 files changed, 14 insertions, 3 deletions
diff --git a/x11/xprofile.T495 b/x11/xprofile.T495
index f472fa5..4329dd8 100755
--- a/x11/xprofile.T495
+++ b/x11/xprofile.T495
@@ -2,6 +2,17 @@
# 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
+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-A-0 connected 3840x2160" > /dev/null; then
+ xrdb -merge $X11CONFIG/Xresources.desktop 2>/dev/null & xrdbpid=$!
+
+ # 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 3840x2160' | grep -o 'DisplayPort-.')"
+ [ -n "$dpdisplay" ] && xrandr --output "$dpdisplay" --mode 3840x2160 --rate 29.98
+
+ wait $xrdbpid # wait for xrdb like in base xprofile
+fi