! Configuration file for X11 programs.
+!
+! It is designed to work with xterm (and its unicode variant).
+!
+! "Term" is an alias for all supported terminal emulators; it is automatically
+! replaced by setup.sh.
-! Use gray on black with a light yellow cursor in XTerm.
-XTerm*foreground: #cccccc
-XTerm*background: black
-XTerm*cursorColor: #ffff66
+! Use gray on black with a light yellow cursor in terminals.
+Term*foreground: #cccccc
+Term*background: black
+Term*cursorColor: #ffff66
+
! Use the meta-key as expected by emacs/irssi.
XTerm*metaSendsEscape: true
! Make sure XTerm allows send events. Necessary for stumpWM so Ctrl-t t can
XTerm.termName: xterm-256color
! Main console colors.
-XTerm*color0: #000000
-XTerm*color1: #ff0000
-XTerm*color2: #00ff00
-XTerm*color3: #ffff00
-XTerm*color4: #0000ff
-XTerm*color5: #ff00ff
-XTerm*color6: #00ffff
-XTerm*color7: #ffffff
+Term*color0: #000000
+Term*color1: #ff0000
+Term*color2: #00ff00
+Term*color3: #ffff00
+Term*color4: #0000ff
+Term*color5: #ff00ff
+Term*color6: #00ffff
+Term*color7: #ffffff
! Bold console colors.
-XTerm*color8: #404040
-XTerm*color9: #ff4040
-XTerm*color10: #40ff40
-XTerm*color11: #ffff40
-XTerm*color12: #4040ff
-XTerm*color13: #ff40ff
-XTerm*color14: #40ffff
-XTerm*color15: #cccccc
+Term*color8: #404040
+Term*color9: #ff4040
+Term*color10: #40ff40
+Term*color11: #ffff40
+Term*color12: #4040ff
+Term*color13: #ff40ff
+Term*color14: #40ffff
+Term*color15: #cccccc
! vim: ft=xdefaults
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 } }'
+ # Prevent code duplication. Term* rules are for all terminals; XTerm rules
+ # are for XTerm and UXTerm. At the moment XTerm and UXTerm are supported.
+ generate perl Xdefaults -ne \
+ 'if (/^Term/) {
+ s/^Term//;
+ print "XTerm", $_;
+ print "UXTerm", $_;
+ } elsif (/^XTerm/) {
+ print $_;
+ s/^XTerm//;
+ print "UXTerm", $_;
+ } else {
+ print $_;
+ }'
# Xdefaults uses ! as comment instead of #. tmp file necessary because of
# different implementations of `sed -i`.
sed 's/^#/!/' Xdefaults > Xdefaults.tmp