l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
September 15: Scratch: programming for children and other not-yet-programmers
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2001 Dec 30 17:12

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] xterm question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] xterm question



On Sat, Oct 20, 2001 at 10:03:56AM -0700, Peter Jay Salzman wrote:
> i've seen people with xterms that have $PWD as the xterm title.
> 
> anyone know how to do this?

In TCSH on my box here at home, I have this:

  switch ( $term )
    case xterm:
      alias cd 'chdir \!*;xttitle $cwd'
      breaksw
    default:
      breaksw
  endsw


So in other words, when I run the command "cd", it not only cd's (chdir),
but it also sets the xterm's title (using a small program I found called
"xttitle") to the directory we ended up in.

(I also run "xttitle" on its own sometimes, when I've got lots and lots
of Xterms open, and am vi'ing certain files or runnother other processes,
because "Gnome Terminal" or "/some/particular/path", aren't very meaningful
in my taskbar. :)  I usually set up an alias to "xttitle" called ",", so
I can type it really quickly:  ", makefile"  or  ", mysql-production")


xttitle can be found here:

  http://www.jarvis.com/xttitle/


Seems you can also do this even more easily using an "echo" :)


  xtitle() { echo "ESC]0;$*^G" }  # title an xterm

(where "ESC" and "^G" are literally those characters)
(this is from Sonic.net's /etc/bashrc, btw)


Anyway, enjoy!  Gotta run!

-bill!



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.