Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Nov 1999 19:20:57 +0000
From:      Mark Ovens <mark@ukug.uk.freebsd.org>
To:        Kevin Street <street@iname.com>
Cc:        questions@freebsd.org
Subject:   Re: xterm and/or X escape sequences
Message-ID:  <19991103192057.E1108@marder-1>
In-Reply-To: <87n1sw86ll.fsf@mired.eh.local>
References:  <19991103001130.G317@marder-1> <87n1sw86ll.fsf@mired.eh.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 03, 1999 at 12:52:22AM -0500, Kevin Street wrote:
> Mark Ovens <mark@dogma.freebsd-uk.eu.org> writes:
> 
> > Does anyone know where I can get a copy of the file ctlseqs.ms, as
> > mentioned in the xterm manpage "SEE ALSO" section:
> > 
> >    Xterm Control Sequences (this is the file ctlseqs.ms).
> > 
> > What I am looking for is the escape sequence to get the current
> > window title. The following will set the window title to "FreeBSD":
> > 
> > 	char *s = "FreeBSD";
> > 	printf("\033]0;%s\007", s);
> > 
> > but what is the complementary sequence?
> 
> Well, it's ESC [ 21 t or printf("\033[21t") but I have never figured
> out a way to do anything useful with it.  If you find a way to
> capture the result, let me know.
> 
> I have a copy of the ctlseqs.ms document, but I can't remember where I
> found it.  I'll be happy to send it to you if you have not already
> gotten 57 copies in your in basket as a result of your post.  It's
> about 32k so I won't post it to the list.
> 

I found a text copy. I originally tried ``locate ctlseqs.ms'' which
threw up nothing. Thinking that it might be gzip'd I tried ``locate
ctlseqs'' and voila /usr/X11R6/lib/X11/doc/ctlseqs.TXT. Unfortunately
it doesn't answer my question, ESC[ is just described as
"Control Sequence Introducer (CSI: 0x9b)". Guess they are X and not
xterm escape sequences.

Thanks for the ESC sequence. You're right, it's diffcult to capture.
It returns "]lxterm-color\" in the window it (a small C program)
is run in, but if you ``> /dev/console 2>&1'' all that appears is
"[21t". Hmmm...

I tend to have lots of xterms running (and before anyone replies
that I'm dis-organized; check the header to this mail, I already
know :) ) and have an alias for cd(1) that writes the current dir to
the title bar and use "set windowname" in vi(1). What I'm trying
to do is patch mutt(1) to save the window title and restore it
after editing a message instead of just restoring it as "xterm-color".

> -- 
> Kevin Street
> street@iname.com
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
STATE-OF-THE-ART: Any computer you can't afford.
OBSOLETE: Any computer you own.
________________________________________________________________
      FreeBSD - The Power To Serve http://www.freebsd.org
      My Webpage http://ukug.uk.freebsd.org/~mark/
mailto:mark@ukug.uk.freebsd.org              http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991103192057.E1108>