X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=dotfiles%2Fuser%2Fthinkpad%2Fminimal%2Fxinitrc;h=29de637537464ac1917972941dab8e38f32d5436;hb=8cb8b27b86315b95fac04800be36ce78f8aead97;hp=5aca941b07f8cfc7821db2d548a2eb741d580f1d;hpb=46c2911ac60e09492b90b1aaa5be456a2aff6b44;p=config
diff --git a/dotfiles/user/thinkpad/minimal/xinitrc b/dotfiles/user/thinkpad/minimal/xinitrc
index 5aca941..29de637 100644
--- a/dotfiles/user/thinkpad/minimal/xinitrc
+++ b/dotfiles/user/thinkpad/minimal/xinitrc
@@ -16,5 +16,14 @@ setxkbmap de
# Set up compose key.
xmodmap ~/.Xmodmap
+# Optionally, for certain Optimus systems with a first GPU connected to the
+# display and a second (NVidia) GPU providing 3D acceleration, use the first GPU
+# as sink for the second. This may confuse DPI settings, so re-set those.
+if [ "${NVIDIA_DIRECT}" ]; then
+ xrandr --setprovideroutputsource modesetting NVIDIA-0
+ xrandr --auto
+ xrandr --dpi 96
+fi
+
# Launch window manager.
-i3
+i3 -c ~/.i3