Re: Label the Terminal window



On Sun, Feb 13, 2000 at 01:27:45AM +0000, Telsa Gwynne wrote:
> I forgot to send this to the list, just to the original poster. Whoops.
> For the benefit of anyone else with a dozen windows who forgets what's
> in which:
> 
> On Sat, Feb 12, 2000 at 04:36:53PM -0600 or thereabouts, Firedog@icekitten.com wrote:
> > How do you label a terminal windows ? I have 6 or 7 open at all times and
> > get confused which one is running what sometimes.
> 
> The real answer: if you poke about in your documentation for XFree86
> (sometimes, eg on Red Hat, there is a separate XFree86-doc package)
> you will eventually find an incomprehensive, gzipped, postscript
> file which tells you about control sequences to alter many things
> and one of them is the title on your window.
> 
> The easy answer that doesn't work: pester gnome-terminal authors to
> add a "Change titlebar to..." menu option. (Don't try this, they'll
> kill me because they've already explained to me about eight times
> that it's (a) bloat and (b) a bit more of a problem than it sounds
> to write well.)
> 
> The easy answer that works: post here, and I reply with my magic
> shellscripts that I'm very proud of which include the control
> characters: put one of these somewhere, chmod 755 it (so it's 
> executable, basically), and run it in the window whose title you
> want to change. 
> 

try this if you are running bash (in .bashrc for example)

  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

PS1="${TITLEBAR}${PS1}"


/Erik
-- 
Erik Bågfors               | Center for Parallel Computers
http://erik.bagfors.nu/    | http://www.pdc.kth.se
erik@bagfors.nu            | bagfors@pdc.kth.se  
Supporter of free software | GSM +46 70 398 54 43 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]