From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103734,ffb0fb48546947c4 X-Google-Attributes: gid103734,public X-Google-Thread: fee84,ffb0fb48546947c4 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-10-11 18:34:38 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!newsxfer.itd.umich.edu!jobone!heifetz.msen.com!zib-berlin.de!cs.tu-berlin.de!news From: fuhrmann@weyl.iaas-berlin.de (FUHRMANN) Newsgroups: comp.windows.x,comp.unix.osf.osf1 Subject: Re: Machine Name in The Title bar??? Date: 11 Oct 1994 13:50:24 GMT Organization: Technical University of Berlin, Germany Message-ID: References: <37bpie$8sd@nyx10.cs.du.edu> NNTP-Posting-Host: weyl.iaas-berlin.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit In-reply-to: ashekhar@lucifer.encore.com's message of Mon, 10 Oct 1994 19:20:11 GMT Xref: bga.com comp.windows.x:12480 comp.unix.osf.osf1:3983 In article <37bpie$8sd@nyx10.cs.du.edu>, mhatz@nyx10.cs.du.edu (Mike Hatz) writes: |> |> Is there a script someone could send along or give a hint for a hack that |> displays the machine name you are logged into in the window title? |> |> The box I am on is a DEC3000 running osf1. |> |> Thanks! |> |> Mike This is bash/ksh: newcd() { \cd $* PS1="$PWD>" if [ "$TERM" = "xterm" ] ; then wintitle="`hostname`:$PWD [`ls -ld . | awk '{print $1,$3,$4}'`]" icntitle=`hostname`:...`basename $PWD` echo -ne "\033]2;$wintitle\007" echo -ne "\033]1;$icntitle\007" fi } alias cd newcd Juergen Fuhrmann -- Juergen Fuhrmann fuhrmann@iaas-berlin.d400.de Weierstrass Institute for Applied Analysis and Stochastics (WIAS) Mohrenstrasse 39 D-10117 Berlin, Germany phone: (49) 030 20377 560 fax: (49) 030 2004975 * Bad News is No News *