wws@rruxc.uucp (Still Searching) (04/25/91)
While reading the Frequently Asked Questions, I discovered the item below. It works super-duper. I've extended it by creating an aliased function in ksh(ell) which puts my current directory name and the current date-time in my title bar every time I execute "mycd." A co-worker wrote a little shell program that sleeps 1 and then updates the title bar so that it looks like he has a digital clock running in the title bar. Pretty neat. We really do need a feature like that, but we need it in an X client instead of an xterm. Does anyone have a suggestion how to do this? Thank you, Wayne Scott ---------------------------------------------------------------------- Subject: 62) How can I change the titlebar of my xterm window? The solution involves sending an escape sequence to xterm which will cause it to update the property which the window manager relies upon for the string which appears in the window titlebar. A solution is as easy as typing this in an xterm running a shell: echo "ESC]2;TEXT^G" where ESC is the escape key, TEXT is the string you wish to have displayed, and ^G is a Control-G (the BEL character). Here is a more complicated csh alias which changes the titlebar to the current working directory when you change directories: alias newcd 'cd \!* ; echo ESC]2\;$cwd^G' The digit '2' in these strings indicates to xterm that it should change only the title of the window; to change both the title and the name used in the icon, use the digit '0' instead, and use '1' to change only the icon name. These sequences work for both R3 and R4 xterm windows; the R4 xterm, however, does not accept the looser sequences which worked under R3 and demands a semicolon, above, for example, where the R3 xterm allowed any character. ---------------------------------------------- wws@bcr.cc.bellcore.com I'm just a soul whose intentions are good, Oh Lord, please don't let me be misunderstood.