On Tue, Nov 25, 2003 at 05:25:17AM -0800, Karsten M. Self wrote: > on Fri, Nov 21, 2003 at 03:43:00PM -0500, Matt Price ([EMAIL PROTECTED]) wrote: > > Hey folks, > > > > lists.debian.org seems to be down, so I couldn't search the list > > archives properly; sorry if this has been discussed ad nauseum. > > > > my .bashrc has the following code in it to set the title of xterms: > > > > # If this is an xterm set the title to [EMAIL PROTECTED]:dir > > case $TERM in > > xterm*) > > PROMPT_COMMAND='echo -ne "\033]0; ${USER}: ${PWD}\007"' > > ;; > > *) > > ;; > > esac > > > > > > I'd like to include other information in the xtitle as well, like, > > for instance, basename of process running in the xterm -- and ideally, > > more complicated stuff like the name of the buffer currently being > > edited in a terminal-bound session of xemacs. > > > > Anyone know a way to handle this automatically? I've come across > > various scripts (usually in csh!) that can be executed from the > > command line, but no solutions that change the window title > > automatically. > > > > Is there any hope? > > Bash Prompt HOWTO > > http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/ >
Hi Karsten, I've used this (excellent) howto to set my prompt up nicely, and to echo things like pwd, time, and username to the xterm title. However, I would love to add {basename} of the currently active process to the title -- this would make it loads easier for me to distinguish among the umpteen xterms in a given xsession. The bash prompt howto does not seem to cover this, far as I can tell. I imagine it's a bit tricky, too, since you'd have to tell the xterm to change its title *before* executing any commands... Just trying to find out if its possible -- apparently this is a bit easier in c and tc shells? thx, matt > Peace. > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]