last updated: 27Aug2008
This is a patch for GNU screen to allow moving ("bumping") and renumbering ("collapsing") of windows.
It has been tested on OSX 10.5 and Solaris 11, but should work elsewhere with no changes.
To apply the patch and build screen-4.0.3
Mac OS X: (requires Xcode and the other screen patches from MacPorts)
Solaris: (requires GNU patch and GNU make)
bash$ tar xzf screen-4.0.3.tar.gz
bash$ cd screen-4.0.3
bash$ patch < patch-bumpandcollapse.diff
bash$ patch < (other platform-specific patches, as desired)
What, Why, How
GNU screen helps me live my life more happily. I highly recommend
it for reducing xterm/Terminal window proliferation, and especially for
the ability to reconnect to remote sessions after a network interruption
(DSL drop, laptop sleep, etc).
GNU screen is an essential part of my workflow, but I've often wished
for a couple additional features:
- the ability to move windows (bump them left and
right, etc) just like tabs in (modern) web browsers.
- tha ability to renumber windows (collapse them
down to a contiguous group, eliminating any gaps created when windows
This patch resolves those issues for me.
Presently, I've co-opted the key commands to control reading, writing,
and removing the screen-exchange file. This is bad, and I'd like to fix it.
But the key sequences are ideal, and I don't use those buffer ops often
enough to be bothered by the remappings (they're still available as readbuf,
writebuf, removebuf -- just not via their usual C-a sequences).
(probably temporary) Key Sequences
|bumpleft (move window to the left)
|bumpright (move window to the right)
|collapse (renumber windows)
This patch works well for me on OSX and Solaris. I haven't
tested it elsewhere, but it looks safe.
This patch is for screen-4.0.3, but if there is interest I
will port it to (presently unreleased) screen-4.1.0.