Use -bg for background colour.
authorIain Patterson <me@iain.cx>
Wed, 8 Jul 2009 14:42:35 +0000 (15:42 +0100)
committerIain Patterson <me@iain.cx>
Wed, 8 Jul 2009 14:42:35 +0000 (15:42 +0100)
Launch terminal with the correct background colour using the -bg option.
Force a black internal border for urxvt so that different coloured
terminals don't look weird with Vim marks and numbers.

.Xdefaults
opt/bin/sshcolourterm
opt/bin/sshterm

index 1969367..b4d45b9 100644 (file)
@@ -28,6 +28,7 @@ Dtterm*dtTermView.marginWidth: 0
 !rxvt.inheritPixmap:   True
 urxvt.foreground:      white
 urxvt.background:      black
+urxvt.borderColor:     black
 urxvt.scrollBar_right: True
 urxvt.font: xft:DejaVu Sans Mono:pixelsize=12:aspect=0.9
 urxvt.multichar_encoding:      noenc
index 0cf4b9f..4a5f302 100755 (executable)
@@ -28,8 +28,8 @@ fi
 if [ ! -z "$colour" ]; then
   colour=${colour##*/}
   colour=${colour##*:}
-  echo -e "\033]49;$colour\007"
-  clear
 fi
 
-exec ${SSHTERM_SSH:-ssh} ${1+"$@"}
+[ -n "$colour" ] && colour="-bg $colour"
+exec ${SSHTERM:-xterm} ${SSHTERM_TITLE:--title} "$1" \
+     $colour ${SSHTERM_EXEC:--e} ${SSHTERM_SSH:-ssh} ${1+"$@"}
index eb209e6..4c9fdb1 100755 (executable)
@@ -3,6 +3,5 @@ cd /
 if [ "$SSHTERM" = "urxvtc" ]; then
   setlock -nx ${RXVT_SOCKET:-$HOME/rxvt-unicode-$HOSTNAME}.lock urxvtd -q -o -f &
 fi
-${SSHTERM:-xterm} ${SSHTERM_TITLE:--title} "$1" ${SSHTERM_EXEC:--e} \
 sshcolourterm ${1+"$@"} &
 disown