Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!crltrx!decvax!ima!minya!jc From: jc@minya.UUCP (John Chambers) Newsgroups: comp.windows.x Subject: Re: changing title Summary: How do you suppress the NL? Message-ID: <112@minya.UUCP> Date: 20 Feb 90 23:29:27 GMT References: <347@seti.inria.fr> Lines: 38 In article <347@seti.inria.fr> soulard@iznogoud.inria.fr (Herve Soulard) writes: > Title name and icon name of a window can be change > using these control sequences : > ] 0 ; string and string will become > the title and icon name > ] 1 ; string for icon name only > ] 2 ; string for title name only OK, now that that's out in the open (;-), here's a followup problem. As someone (I think it was me) said earlier, you can make you .cshrc define a bunch of aliases: | switch ( "$TERM" ) # Some terminal-specific stuff. | # The 'setttl' command puts the hostname and cwd in the title bar. | # The 'putttl' command puts its args in the title bar. | # The 'setprompt' command sets the prompt. | case xterm*: # For xterm, we know how to write to the title bar. | alias setttl 'echo "]0;"$HOST":"`pwd`""' | alias putttl 'echo "]0;"\!*""' and so on. This works just fine, and I go on to alias cd to call setttl to get the hostname and cwd into the title bar. It also produces a newline, which goes to the window as ordinary output, causing a blank line on the screen. This isn't a real big deal, but it's unaesthetic, sloppy, and wastes screen space. I've tried suppressing it, to no avail. I've tried both 'echo -n ...' and 'echo ...\c', and the result was "-n" in the title bar or "c" on the next line. '\\c' didn't work, either; it put "\c" out to the screen. Putting the \c before the ^G isn't effective, either; you get a 'c' output in that case, too. As I said, it's not a real major catastrophe, but I do like to make things neat and clean, and this definitely isn't that. Can anyone come up with a variant of these aliases that put ALL their output to the title bar, and nothing (i.e., no CR of LF) to the main window? -- John Chambers ...!{harvard,ima,mit-eddie}!minya!jc [Sorry, no clever saying today.]