To begin with, I am on Lubuntu, so I can benefit from the latest screen patches that will enable vertical splitting of windows with no need to compile from source. (It really took ages...)

However, despite reading the manual thoroughly a few times, there was no indication how to get the split ratio to something else but 50:50.

So I opened xterm, launched screen, pressing Ctrl+a| to split the window vertically in a 50:50 fashion.
Good, but what if I want a 70:30 ratio for a change? Sometimes I might need this, when I'm working deeply in the hierarchy of subdirectories on the left hand side, and just doing something rather trivial (that does not require this width) on the right.
Curiously enough, even the official manual will only tell about modifying the height, but what I need is the width. Even more curiously, I read something about passing a -h/-v parameter to the resize command on the command line inside screen. (As I'm writing this, you won't find these parameters explained in the manual.) My GNU screen 4.02.01 does not seem to accept either of these two options; only a :resize <value> (with value being a signed integer number) is possible, which, as mentioned, will only ever modify the height, but not the width.

Perhaps modifying the width when the window is split vertically is not intended in the first place?
Well, it would come in handy sometimes, that is for sure.

  • 2
    Is there an error message when you try Ctl-A :resize -h 50? It works for me, but I'm on v4.01 though. – garethTheRed Dec 9 '14 at 13:33
  • You're right, it works! The -h option actually does what I want!! However I wanted to get the thing bigger when panes are split vertically, that's why I used -v throughout (and the window only "shook" for a moment, but it didn't really work)! I think we both have figured out the basic problem in current screen: the options are confusing as heck and far from self-explanatory. Plus, I wish someone could tell me a plausible reason why these two options for resize aren't explained anywhere in the man page. – syntaxerror Dec 9 '14 at 13:44
  • 2
    You also use a percentage, as in Ctl-A :resize -h 50% to split it 50/50. – garethTheRed Dec 9 '14 at 14:44
  • 1
    OK, I think I finally understood why it's called h. The h must be understood as horizontal AXIS (X, mathematically). Anyway, had I written screen, I'd have used resizeX and resizeY which would have been way more self-explanatory and would not (in complex split setups) force the user to draw the setup on paper to not mix up horizontal and vertical. Supposing you have 2 windows split 50:50, horizontally. Isn't it confusing that you need to change a vertical (-v) parameter to change the splitting ratio? To talk about X axis and Y axis would no longer let your brain rotate. – syntaxerror Dec 9 '14 at 14:52
  • I'd go for h for horizontal as it fits in well with v for vertical. When you resize your horizontal split with resize -h 33% you are moving the split line in a horizontal direction, which sit if makes sense. However, you can create a split with the :split [-v] command and that oddly enough works the other way. You end up creating a split with :split -v and resize it with :resize -h! – garethTheRed Dec 9 '14 at 14:57

If xterm isn't a necessity, one solution is changing terminals. Terminator has built-in split capability, horizontal and vertical, and the size of each section can be adjusted with keyboard shortcuts. Each section can also be further split. Should be available in repos.

  • 1
    No, I do want to keep using xterm because I like to stick to standard tools (for now) which work everywhere, on a home PC as well as on a workstation in the office without further tweaking or fiddling. What I can additionally install to make life easier on my private box is yet another story. But thanks for replying anyway. – syntaxerror Dec 9 '14 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.