backup terminal title

Dominic Fandrey kamikaze at bsdforen.de
Sat Feb 6 13:56:01 UTC 2010


Matthias Apitz wrote:
> El día Saturday, February 06, 2010 a las 01:38:11PM +0100, Dominic Fandrey escribió:
> 
>> 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.
>>
>> Some digging in the portmaster code showed up an escape sequence:
>> printf "\033]0;%s\007" "YOUR TEXT GOES HERE"
>>
>> 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.
> 
> Play around with xwininfo(1), like:
> 
> $ xwininfo -tree -root | fgrep xterm
> 
> which prints the titles for all your XTerm windows.

Nice, but I need something that works with base system
components. Like an escape sequence that causes the terminal
to reset its title.

Regards

-- 
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? 


More information about the freebsd-questions mailing list