home · contact · privacy
Some keymap and xterm improvement.
[config] / dotfiles / user / thinkpad / minimal / xinitrc
index 5aca941b07f8cfc7821db2d548a2eb741d580f1d..6a2ad7a4ae053ce19356968e55a12e21f1431847 100644 (file)
@@ -10,11 +10,20 @@ xrdb -merge ~/.Xresources-local
 # Redshift to Berlin, Germany.
 redshift -rl 53:13 &
 
-# Enforce QWERTZ.
+# Enforce QWERTZ. (Why twice?)
 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