Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!snorkelwacker!bloom-beacon!POSEUR.JPL.NASA.GOV!earle From: earle@POSEUR.JPL.NASA.GOV (Greg Earle - Sun JPL on-site Software Support) Newsgroups: comp.windows.x Subject: Re: Title bar flicker fix for XTerm Message-ID: <9010051001.AA02336@poseur.JPL.NASA.GOV> Date: 5 Oct 90 10:01:04 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 38 >>> Using tcsh, I set re-set the title of xterm before each shell prompt, >> >>May I suggest a different approach to the same end. Instead of >>having the tcsh prompt string set the title bar on every command, >>alias the `cd ' command so as to set it only when actually changing the >>current directory. > >Better call it something besides 'cd', though, like 'xcd'. Naaaahhhh ... you guys are all wet. Use tcsh's `cwdcmd' alias: if ($?HOSTTYPE) then # set tcsh prompt & other stuff if ($?WINDOWID) then set prompt="`hostname`:"$shelldepth":%h % " set WM_NAME=`xprop -id $WINDOWID WM_CLASS | sed 's/^.*"\(.*\)",.*/\1/g'` alias cwdcmd 'echo -n "^[]2;"{$WM_NAME}":$cwd^G"' # make sure accidental ^D doesn't kill my console xterm! xprop -id $WINDOWID WM_COMMAND | egrep '"-C' > /dev/null if ($status == 0) then set ignoreeof set watch=(1 any any) endif else # put the current directory in prompt if not running in X11 or OpenWindows set prompt="`hostname`:"$shelldepth":%h [%/] % " endif ... else # set csh prompt & other stuff ... endif -- - Greg Earle | "This is Kraft. It uses a blue box. Sun Los Angeles | This is Stouffer's. It uses red. JPL on-site Software Support | The choice is yours." earle@poseur.JPL.NASA.GOV | Pretty damn convincing argument, eh?