X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=setup.sh;h=7ace8e0d20ab164b95be773f1bf567566454d90a;hb=462f355f79fa930d54a4dbe6a45efca894bb32bb;hp=e928a804a3b1036714538c2f06f29d23b76450ce;hpb=2356c71cf1d38a2f09b76d10e6a0ba40dcf9ce11;p=config%2Fdotfiles.git diff --git a/setup.sh b/setup.sh index e928a80..7ace8e0 100755 --- a/setup.sh +++ b/setup.sh @@ -1,12 +1,26 @@ +#!/bin/sh + # Setup script for X11 configuration files. . ../lib.sh -# Link setup. if installed stumpwm; then link stumpwmrc ~/.stumpwmrc fi + if installed X; then - link xinitrc ~/.xinitrc + # 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 + + if [ `os` != darwin ]; then + link xinitrc ~/.xinitrc + fi + link xmodmaprc ~/.xmodmaprc + link Xdefaults ~/.Xdefaults fi