]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Xdefaults: Automatically create settings for UXTerm.
authorSimon Ruderich <simon@ruderich.org>
Thu, 23 Apr 2009 16:36:33 +0000 (18:36 +0200)
committerSimon Ruderich <simon@ruderich.org>
Thu, 23 Apr 2009 16:36:33 +0000 (18:36 +0200)
.gitignore [new file with mode: 0644]
Xdefaults.in [moved from Xdefaults with 100% similarity]
setup.sh

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..760f605
--- /dev/null
@@ -0,0 +1,2 @@
+# Generated with m4 or awk.
+Xdefaults
similarity index 100%
rename from Xdefaults
rename to Xdefaults.in
index bb7f192b054b4f2c44dc2574c11a27505e1c333f..9e161bde0d519ac5cf614a52de902444cb67d144 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -5,11 +5,17 @@
 
 . ../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 #.
+    sed -i 's/^#/!/' Xdefaults
+
     link xinitrc ~/.xinitrc
     link xmodmaprc ~/.xmodmaprc
     link Xdefaults ~/.Xdefaults