tomw@orac.esd.sgi.com (Tom Weinstein) (09/16/90)
In article <THOTH.90Sep15195313@reef.cis.ufl.edu> thoth@reef.cis.ufl.edu (Gilligan) writes: > Guess what! here's yet another title setting script. The only > difference is that it does a few escape sequences for the color xterm. > I call it mycolors, but if you can think of a better name, mail me. [ script deleted for brevity ] > -- > #perl -ne > #/-------------------- > print "a window is a terrible thing to paste -", $me; > #( My name's not really Gilligan, It's Robert Forsman, without an `e' ) > s/Gilligan/Robert Foresman/g; > s/Foresman/Forsman/g; > #--------------------/ Something that I think wasn't clear in the documentation: If you are using the dynamic color option, you can specify more than one color in the same command by seperating them with ;'s. For instance: ^]]10;PeachPuff3;NavyBlue;OrangeRed;OrangeRed;Black sets the primary foreground and background colors, the text cursor color, and the mouse pointer foreground and background colors. -- Tom Weinstein Silicon Graphics, Inc., Entry Systems Division, Window Systems tomw@orac.esd.sgi.com Any opinions expressed above are mine, not sgi's.
thoth@reef.cis.ufl.edu (Gilligan) (09/16/90)
Guess what! here's yet another title setting script. The only
difference is that it does a few escape sequences for the color xterm.
I call it mycolors, but if you can think of a better name, mail me.
#!/bin/sh
usage () {
cat << END
usage: $0 [ options ]
This program sets the colors in the color xterm.
All options take an X color specification as
their argument. The possible arguments are:
-fg or -foreground sets the foreground color
-bg or -background sets the background color
-cr or -cursorcolor sets the text cursor color
-ms or -pointercolor sets the mouse pointer foreground color
-mb or -pointerbackground sets the mouse pointer background color
-tfg or -tekforeground sets the tektronix foreground color
-tfg or -tekbackground sets the tektronix background color
The following are include just because it's
painless to do so:
-T or -title sets the windomanager titlebar
-n or -iconname sets the windomanager icon name
-Tn or -name sets the windomanager titlebar and the icon name
-lf or -logfile sets the log file for the xterm
END
exit 1
}
if [ $# -lt 2 ]; then usage; fi
while [ $# -ge 2 ]; do
case "$1" in
-Tn|-name) code=0 ;;
-n|-iconname) code=1 ;;
-T|-title) code=2 ;;
-fg|-foreground) code=10 ;;
-bg|-background) code=11 ;;
-cr|-cursorcolor) code=12 ;;
-ms|-pointercolor) code=13 ;;
-mb|-pointerbackground) code=14 ;;
-tfg|-tekforeground) code=15 ;;
-tbg|-tekbackground) code=16 ;;
-lf|-logfile) code=46 ;;
*) echo unknown flag "$1"
shift 1
continue
;;
esac
echo "]$code;$2"
shift 2
done
if [ $# -gt 0 ]; then
echo unknown flag "$1"
usage
fi
--
#perl -ne
#/--------------------
print "a window is a terrible thing to paste -", $me;
#( My name's not really Gilligan, It's Robert Forsman, without an `e' )
s/Gilligan/Robert Foresman/g;
s/Foresman/Forsman/g;
#--------------------/