Latest Version: Version 1.0-2, released 04-Dec-2001
04-Dec-2001 Update: I have added a simple man page to the source code, and rebuilt the RPM on a Mandrake 8.1 i686 Linux workstation. The RPM should also work with recent versions of RedHat Linux, but of course your mileage may vary.
This little bit of code has been in my UNIX tool kit since circa 1994. A friend of mine had a shell script version of this, which I ported to a C program in order to make it faster. Back in the old days, every millisecond counted on those crusty old Sun SPARC 2s!
All this program does is print some escape characters to standard out, which have the magical effect of changing the title of your xterm windows.
Even if you don't need a utility like this, you might wish to peruse the source code to get the escape characters used to change the title bar.
Back to the top.
I use this in my "cd" alias in my .tcshrc file like this:
#!/bin/tcsh
set host=`hostname`
set user=`whoami`
switch ( $term )
case xterm:
alias cd 'chdir \!*;xttitle $user@$hostname\:$cwd $hostname'
breaksw
default:
echo "Not using xterm settings"
breaksw
endsw
Whenever I type "cd <dirname>", my xterm window title changes to reflect the current working directory.
Click here for a screenshot of what my xterm windows look like.
Back to the top.
Back to the top.
Latest Version: Version 1.0-2, released 04-Dec-2001
(updated 04-Dec-2001)
(created 04-Dec-2001)
(updated 04-Dec-2001)Back to the top.
Well, I put this together mostly as an experiment to learn to use autoconf/automake and the Redhat Package Manager. The source code isn't that tough. If you find any bugs or have any suggestions, contact me and I'll put your name here if I include your suggestions or fixes in the next release.
Back to the top.
Send any questions, comments, or bugfixes to michael@jarvis.com.
Click here for my page of UNIX links, or here for my main home page.
Back to the top.