Re: addressable titlebars for Gnome-terminal?



On Thu, May 21, 1998 at 12:54:39PM -0500, Miguel de Icaza expounded thus:

> 
> > the only thing that's keeping me using xterm these days...well, actually
> > mxterm...is the addressable titlebars.  basically, this feature allows one
> > to put a string in the titlebar using a certain escape character sequence.
> > 
> > this is especially handy to me as i have my titlebar show me which machine
> > i'm logged in on and who i'm logged in as.  if you're operating on a log
> > of machines, this is a very nice feature.
> 
> Can you tell us what is the escape sequence you use to do this?

>From the "Xterm Control Sequences" document, from the xterm-5.0 distribution:

[OSC]Ps[;]Pt[ST]
[OSC]Ps[;]Pt[BEL]	Set Text Parameters:

	Ps = 0:	Change Icon Name and Window Title to Pt
	Ps = 1:	Change Icon Name to Pt
	Ps = 2:	Change Window Title to Pt

Legend:
	[OSC]	Operating System Command lead-in:
		either the two-byte sequence 0x1b 0x5d (ESC ])
		or the one-byte sequence 0x9d

	Ps	A single (usually optional) numeric parameter, composed of
		one or more digits.

	[;]	a semi-colon, the one-byte sequence 0x3b

	Pt	A text parameter composed of printable characters.

	[ST]	String Terminator:
		either the two-byte sequence 0x1b 0x5c (ESC \)
		or the one-byte sequence 0x9c

	[BEL]	The ASCII bell (Ctrl-G, also known as 0x07)

Note:
	Set Text Parameters also supports, at least in XTerm 5.0, Ps values
	that change the colour names, the log file name and the font,
	subject to some compile-time options.

> I have CCed Michael Zucchi.  The terminal emulator widget author.
> Michael, I would suggest to catch this escape sequence and emit a
> signal "titlebar_changed" to let any embedding application to do the
> best thing.

Also CCed to Michael Zucchi, although from the work he's done on the widget
already, I suspect he knows all this anyway.  :)

see ya...
Matt.
-- 
** Speaking as and for myself, not on behalf of Maves.
work:  clamat@van.maves.ca  (Maves International Software, Inc.)
play:  Matthew_Clarke@mindlink.bc.ca  or  CompuServe:  74040,2221

"After being a technitian for 2 years, I've discovered if people took care
of their  health with the same reckless abandon  as their computers,  half
would be  at the kitchen table on  the phone with the hospital,  trying to
remove their appendix with a  butter knife."
	-- .sig by Brian Jones <balif@nacs.net> (seen on linux-kernel)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]