Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!ICASE.EDU!tom From: tom@ICASE.EDU (Tom Crockett) Newsgroups: comp.windows.x Subject: Re: twm program 'mytitle' Message-ID: Date: 29 Mar 89 16:06:44 GMT References: <2@nrl-cmf.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 38 > *Excerpts from xpert: 28-Mar-89 twm program 'mytitle' Tim* > *Wicinski@CMF.NRL.NAV (367)* > a few releases of twm ago, Tom sent out a small program called 'mytitle' > to > the twm release. It didn't do much, but added enough to each xterm so > when > I iconified it, the machine name would appear. Shouldn't the same effect be achievable using an xterm escape sequence? I'm using that capability with awm to redefine the "cd" command so that it causes the window and icon titles to follow the current working directory. The aliases I use to do this look like alias xheader 'echo -n "^[]2;\!*^G"' # sets window title alias xiheader 'echo -n "^[]1;\!*^G"' # sets icon label alias cd 'cd \!* ; xheader "${Host}:${cwd}"; xiheader ${Host}:`basename $cwd`' Note: "^[" and "^G" must be the single control characters ESC and ctrl-G. The character strings "^[" and "^G" don't hack it. There is a bug in awm when the "icon.labels" resource is turned on, which prevents the icon label from being updated when it changes (it sticks with the icon name in use when the window was first iconified). However, with the uwm-style icons, the above escape sequences work fine. I haven't tried any of this with twm, but this is a really handy feature. It merely requires that the window manager pay attention to the current values of the window and icon titles. (Presumably xterm is sending some kind of an event to the window manager?) Tom Crockett ICASE Institute for Computer Applications in Science and Engineering M.S. 132C e-mail: tom@icase.edu NASA Langley Research Center phone: (804) 864-2182 Hampton, VA 23665