Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!cernvax!chx400!chx400!unizh!sinkwitz From: sinkwitz@ifi.unizh.ch (Rainer Sinkwitz) Newsgroups: comp.sys.sgi Subject: Re: Changing text in wsh title bar? Message-ID: <1991Feb18.170248.3393@ifi.unizh.ch> Date: 18 Feb 91 17:02:48 GMT References: <1991Feb17.235559.674@agate.berkeley.edu> Reply-To: sinkwitz@ifi.unizh.ch Organization: University of Zurich, Department of Computer Science Lines: 73 In article <1991Feb17.235559.674@agate.berkeley.edu> dwallach@soda.Berkeley.EDU (Dan Wallach) writes: >On other systems, I have my shell put the current working directory in the >title bar of the window. I want also to do this with my wsh'es on the Iris. > This should be subject of a faq (freq. asked questions) if you look at a former question: >In <1251@acf5.NYU.EDU> sabbagh@acf5.NYU.EDU (sabbagh) writes: > >>After reading the "4Sight Programmers Guide" (i.e., IRTFM) I was able to >>change the title of a wsh window. However, I cannot seem to find out >>how to change the title of the icon of such a window. > >To change the icon title: > echo "\033P3.yTITLE\033\\" > >Just for completeness, here's how to change the wsh title: > echo "\033P1.yTITLE\033\\" > >In a script, replace "TITLE" with "$!", and it will set the title to >the first command line argument. > > >-- >Vic Mitnick Silicon Graphics, Inc. >vic@sgi.com System Software Division >(415)335-1372 I use the following in my .login file: (adopted from 4Dgifts/.login) (pay attention to ^H's and ^G's and long "alias" line or uudecode the version below) --------------------------------begin (don't cut here, use uudecode) ---- if ($TERM == "iris-ansi" || $TERM == "iris-ansi-net") then alias setp 'set hwd=$cwd:h; set prompt = "\^[P1.y< $USER@`hostname` >^[\^H<\ ! /$hwd:t/$cwd:t> "' else if ( $term == "xterm" ) then alias setp 'set hwd=$cwd:h; set prompt = "\^[]2;< $USER@`hostname` >^G<\! /$ hwd:t/$cwd:t> "' else alias setp 'set hwd=$cwd:h; set prompt = "<\! `hostname` /$hwd:t/$cwd:t> "' endif endif setp alias cd 'cd \!*; setp' --------------------------------end It sets the title to be user@host and puts the pathname into the prompt. It works with wsh and xterm. begin 644 loginstuff M:68@*"1415)-(#T](")I3P@)%5315)`8&AO