From owner-freebsd-questions@FreeBSD.ORG Sat Feb 6 13:15:12 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B81A106568D for ; Sat, 6 Feb 2010 13:15:12 +0000 (UTC) (envelope-from dickey@saltmine.radix.net) Received: from saltmine.radix.net (saltmine.radix.net [207.192.128.40]) by mx1.freebsd.org (Postfix) with ESMTP id DE82E8FC15 for ; Sat, 6 Feb 2010 13:15:11 +0000 (UTC) Received: from saltmine.radix.net (localhost [127.0.0.1]) by saltmine.radix.net (8.12.2/8.12.2) with ESMTP id o16DF9V4015897; Sat, 6 Feb 2010 08:15:10 -0500 (EST) Received: (from dickey@localhost) by saltmine.radix.net (8.12.2/8.12.2/Submit) id o16DF9CQ015896; Sat, 6 Feb 2010 08:15:09 -0500 (EST) Date: Sat, 6 Feb 2010 08:15:09 -0500 From: Thomas Dickey To: Matthias Apitz Message-ID: <20100206131509.GB14340@saltmine.radix.net> References: <4B6D62B3.4070702@bsdforen.de> <20100206125554.GA2173@current.Sisis.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Bn2rw/3z4jIqBvZU" Content-Disposition: inline In-Reply-To: <20100206125554.GA2173@current.Sisis.de> User-Agent: Mutt/1.3.27i Cc: Dominic Fandrey , freebsd-questions@freebsd.org Subject: Re: backup terminal title X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 13:15:12 -0000 --Bn2rw/3z4jIqBvZU Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 06, 2010 at 01:55:55PM +0100, Matthias Apitz wrote: > El d=EDa Saturday, February 06, 2010 a las 01:38:11PM +0100, Dominic Fand= rey escribi=F3: >=20 > > I just started to wonder how portmaster changes the window title > > of my terminal and why it doesn't change it back when it > > terminates. > >=20 > > Some digging in the portmaster code showed up an escape sequence: > > printf "\033]0;%s\007" "YOUR TEXT GOES HERE" > >=20 > > Unfortunately I am entirely clueless as to how one could backup > > the old title string to restore it upon termination. It seems > > to me this ought to be a precondition to using this kind of > > feature. >=20 > Play around with xwininfo(1), like: >=20 > $ xwininfo -tree -root | fgrep xterm >=20 > which prints the titles for all your XTerm windows. iirc, vim does something like this, but it has the potential for being very slow (ymmv). --=20 Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net --Bn2rw/3z4jIqBvZU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (SunOS) Comment: For info see http://www.gnupg.org iD8DBQFLbWtbtIqByHxlDocRAjyYAKChS3eALb+nAXVtlZUtoeTU0BSjZQCdGCSx LupIJbgqUxq2v6yiNsG8xaE= =uSFu -----END PGP SIGNATURE----- --Bn2rw/3z4jIqBvZU--