screen-users
[Top][All Lists]
Advanced

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

Re: Window Titling


From: Dan Mahoney (Gushi)
Subject: Re: Window Titling
Date: Wed, 1 Jul 2020 00:24:24 -0700 (PDT)
User-agent: Alpine 2.21.99999 (BSF 352 2019-06-22)

On Tue, 30 Jun 2020, Dan Mahoney (Gushi) wrote:

All,

I'm using the \033k hack to auto-title my windows in the listing brought up by ctrl-a " (and also in the statusline).

Is there a way to embed color information into this screen (for example, I might want any window with a root shell to have a red title).

Related question:

The gnu screen manual about dynamic titles only says that you can give screen something to "search" for -- basically, says:

'screen has a shell-specific heuristic that is enabled by setting the window’s name to search|name'

It's a confusing section of manual, as neither search nor name are literal there.

Instead, I directly print the escape sequences IN my .bashrc/cshrc to give me useful window titles like where I'm sshing from/to, etc. (This seems important given the above context), rather than having screen try to parse the output of my shell and guess about what the title should be.

As an example, in cshrc I do:

alias postcmd 'printf "\033%s%s %s %s\033\\" "k" "\!#:0" "\!#:$" "[$HOST]"'

(This gives me a title like ssh hostname, where the command could be ssh -v -v -t hostname)

The screen manual should certainly make mention of this method, and include examples for bash and the like. I'm willing to contribute text and examples. Is this a better question for screen-dev?

-Dan

--

--------Dan Mahoney--------
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
FB:  fb.com/DanielMahoneyIV
LI:   linkedin.com/in/gushi
Site:  http://www.gushi.org
---------------------------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]