[Top][All Lists]

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

Patch to move and renumber windows, screen-4.0.3

From: reynhout
Subject: Patch to move and renumber windows, screen-4.0.3
Date: Wed, 27 Aug 2008 19:09:53 +0000
User-agent: Mutt/


I've written a minor patch against 4.0.3 to add the ability to move
windows right or left (up or down?) slot-by-slot (without using the
:number UI), and also to renumber all active windows starting with 0,
eliminating gaps created by exited windows.

for more.

This is useful to me -- I often have very long-lived screen instances
on gateway machines that I use to reach dozens of other machines.
Some of those sessions are also very long-lived, but some are very
ephemeral, so I frequently have a mess of windows that I'd like to
reorganize.  :number works well, but can be tedious for large sets.

If this is useful to anyone else, let me know and I'll work out the
remaining details.  Namely:

  - I stole the key sequences from readbuf, writebuf, removebuf.
    Dreadful etiquette, I realize, but the keys (<, >, =) were
    ideal for the purpose, and acceptable for private build use.
    Please let me know if you can think of another good set!

  - The patch is for 4.0.3, but a quick glance at the 4.1.0 code
    suggests that it'll be simple to port.

  - I've written no documentation in the patch.  

Actions are bumpleft (C-a <), bumpright (C-a >), and collapse (C-a =).
They all use the code from RC_NUMBER, extracted out into a fun called
SwapWindows.  I'm not doing any direct wtab manipulation, so hopefully
the patch is as stable as the existing code.  I've tested on OSX and
Solaris in my fairly simple config and use cases, and it works for me.
If you're able to test the patch out, I'll happily take bug reports.

Thank you,


reply via email to

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