. ../lib.sh
-# Link setup.
if installed stumpwm; then
link stumpwmrc ~/.stumpwmrc
fi
+
if installed X; then
+ # Use settings for XTerm also for UXTerm. This prevents code duplication.
+ generate awk Xdefaults \
+ '{ print ; if ( /^XTerm/ ) { print "U" $0 } }'
+ # Xdefaults uses ! as comment instead of #. tmp file necessary because of
+ # different implementations of `sed -i`.
+ sed 's/^#/!/' Xdefaults > Xdefaults.tmp
+ mv Xdefaults.tmp Xdefaults
+
link xinitrc ~/.xinitrc
link xmodmaprc ~/.xmodmaprc
link Xdefaults ~/.Xdefaults