Subject: format windowlist view with color.

From: "Bruce Edge" <[email-masked]>
Date: Tue, 15 Jul 2008 09:55:02 -0700

I have a lot of stuff in my screen sessions. 30+ terminal sessions on a
dozen or more machines.
I've tries a lot of things to make it more readable at a glance, but it
keeps coming back to wanting color to highlight sections of it.

Does anyone know how to add color escape sequences to the windowlist view?

I have RTFM'd and experimented a lot, but it just prints whatever escape seq
I put in it.

Thanks in advance
-Bruce
_______________________________________________
screen-users mailing list
[email-masked]
http://lists.gnu.org/mailman/listinfo/screen-users

---

From: Micah Cowan <[email-masked]>
Date: Tue, 15 Jul 2008 10:37:52 -0700

Bruce Edge wrote:
> I have RTFM'd and experimented a lot, but it just prints whatever escape
> seq I put in it.

"Put in it"? How have you put anything in the windowlist view? The
windowlist is not modifiable, to my knowledge.

A common technique is to use the hardstatus to keep track of windows
(see the bottom of the "String Escapes" section for a handy example of
this). Not sure if that'll help a ton with 30+ terminal sessions...

You may find the "group" functionality of the current development
sources to be handy; you can create a group window with

  C-a : screen -t my-group //group

and then any windows you create from the group window, or from a window
that's part of the group, will be a part of that group. When in a window
that's part of a group, only other windows of that group will show up in
the windowlist or hardstatus %w/%W escapes (you can get a full list by
giving windowlist the -m option).

You can also change the group a window is in with

  C-a : group my-group

The feature's currently got some glitches (Killing a group window seems
to freeze screen for me, but only sometimes). But it can be a useful
organization tool.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer,
and GNU Wget Project Maintainer.
http://micah.cowan.name/

---

From: "Bruce Edge" <[email-masked]>
Date: Tue, 15 Jul 2008 10:55:42 -0700

On Tue, Jul 15, 2008 at 10:37 AM, Micah Cowan <[email-masked]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Bruce Edge wrote:

OK, bad terminology. I'm setting the window's title.

So, to rephrase, are there any color escape sequences that can be used in
the window title?
This would then show the same color for the title in the window list.

I wanted to change the color of the title for any windows that were running
a command, ie: not at a shell prompt. This would make it easier to pick out
what windows had running commands. Currently I change the window title to
to  ">> command <<" to make them stand out a bit when they are running
something. (using zsh preexec)

Another would be to change the title color then the last shell command
returned a non-zero status. This would be like an alert for when a command
failed.

Also, all my build/edit windows for a particular source branch would have
the same color, etc...

> this). Not sure if that'll help a ton with 30+ terminal sessions...

Yeah, too much data. The window list is what I use as it can show more
stuff.

> to freeze screen for me, but only sometimes). But it can be a useful

That sounds very cool. I have to try that.

What would also be nice is if you could re-order the window list. ie: move
entries around so that you could group related shells together.

-Bruce

---

From: Micah Cowan <[email-masked]>
Date: Tue, 15 Jul 2008 11:13:37 -0700

Bruce Edge wrote:
> So, to rephrase, are there any color escape sequences that can be used
> in the window title?

Not that I'm aware of :\

> I wanted to change the color of the title for any windows that were
> running a command, ie: not at a shell prompt. This would make it easier
> to pick out what windows had running commands. Currently I change the
> window title to to  ">> command <<" to make them stand out a bit when
> they are running something. (using zsh preexec)
> 
> returned a non-zero status. This would be like an alert for when a
> command failed.
> 
> Also, all my build/edit windows for a particular source branch would
> have the same color, etc...

Sounds like groups might be handy for that. That's the sort of thing I'm
using them for lately (note, I myself just found out about groups this
week).

>     sources to be handy; you can create a group window with

...

> What would also be nice is if you could re-order the window list. ie:
> move entries around so that you could group related shells together.

You can already do that with C-a : number <new number>. Also, Sadrul
just pushed a change that allows you to give _relative_ numeric changes,
so that C-a: number +1 can move a window from number 4 to number 5, etc.
If you bind number +1 and number -1 to appropriate keys, you could
probably find these to be useful as well.

The numbers/ordering when you're using groups, though, appears kind of
funky to me. Though it seems that they're by-group; they could be
delineated/ordered better in that case, however. (I've just filed an
issue for that.)

- --
Micah J. Cowan