Date: Fri, 6 Feb 1998 11:35:24 +1030 From: Greg Lehey <grog@lemis.com> To: Burton Sampley <bsampley@slip.net>, questions@FreeBSD.ORG Subject: Re: Dynamic title in XTerm bound to F8 (fwd) Message-ID: <19980206113524.54855@freebie.lemis.com> In-Reply-To: <Pine.BSF.3.96.980205153531.366B-100000@bsampley.my.domain>; from Burton Sampley on Thu, Feb 05, 1998 at 03:42:22PM -0800 References: <Pine.BSF.3.96.980205153531.366B-100000@bsampley.my.domain>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 5 February 1998 at 15:42:22 -0800, Burton Sampley wrote: >> From: Burton Sampley <bsampley@slip.net> >> >> I have been trying unsuccessfully to bind the appropriate sequence of >> escape characters to dynamically change the title of an xterm window to >> F8. >> >> (snip) >> >> Is there an easier way to accomplish what I want? BTW, I can't modify >> .cshrc on the remote boxes. >> >> I have tried using string() to send the hex values for the escape key, but >> that only seemed to echo the correct sequence to the display and would >> only chime the bell. > > First, I apologize for cross posting this message to both questions and > isp mailing lists. I don't understand why this should interest the ISPs, so I'm replying only to -questions. > I thought maybe a freebsd user has experienced this problem and has > a solution I could use. Yes, indeed. I have a program called xtset which does exactly what you're looking for. I've put it on ftp://ftp.lemis.com/pub/xtset.c (source) and ftp://ftp.lemis.com/pub/xtset (executable). Unfortunately, in the course of time, I seem to have lost the man page. The only documentation is in the source: + Passed a string to set the window title and / or icon name to and this string + is text except for % characters which introduce fields like printf. + + %h is translated to hostname, excluding domain name + %H is translated to hostname, including domain name if gethostname returns it + %d is translated to current dir + %D is translated to current dir, only last part (unless this is src, man, doc, etc., in which + case the previous part is included as well) (Greg Lehey, 4 June 1993) + %u is current user name + %g is current group name + %U is current real user name + %G is current real group name + %m is octal current umask + %e is value of environment variable XTXTRA or null string + %t is the complete name of the stdin terminal, if it is a terminal + %T is the last part of the stdin file name, if it is a terminal + %% is a real percent sign, God knows why you'd want one but there you are + + So for instance the string: + + "%d@%h (%u:%g)" might expand to "/home/sol/msmith@rheya (msmith:group2)" + + command line arguments are: + + -t to update window title + -i to icon name + + (if neither of these are given, both are done) + + The program exits silently if the TERM variable is not set to xterm Greg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980206113524.54855>