Skip to content

Maximize use of screen real estate #117

@jaybeers

Description

@jaybeers

I would prefer that the window placement behaviour use as much of the available space as possible (I know plenty of other people probably prefer the default, but I can only speak for my own preferences :) ).

First, a little background to make sure I'm explaining myself properly. As I understand it from observing its behaviour, ClusterSSH figures out the geometry of the area where it can draw windows (starting with the area of the entire workspace and subtracting the "$screen_reserve_*" amounts) and then tiles as many $terminal_size windows as possible in that space, decreasing the height of each window if necessary to fit them all in.

What I would like is for the window allocation to be "greedy" and use up as much of the screen as possible; in other words, make the windows bigger if there's space for it. These are my proposals:

Horizontal expansion only

Do the same thing you're doing now, but expand the windows horizontally (i.e. increase $COLUMNS) to fill the available space. Anything "left over" (e.g. if you've got an odd number of windows) should go to the first host on the command line...so you'd wind up with something like this if you had five windows, for example:

-----------------
|     host1     |
-----------------
| host2 | host3 |
-----------------
| host4 | host5 |
-----------------

Horizontal and vertical expansion

Take the above and go one step further: also expand the windows vertically (i.e. increase $ROWS) to fill the available space; the first host also gets these leftovers.

Perhaps a bit silly

What if you could specify a different font based on how many total hosts you were connecting to? In other words, maybe if I only open four hosts I want a nice big font 'cause it's easier to read, but if things snowball into a 37-host situation I want to back it down to something more suited, like good ol' 5x8. I'm not sure how you'd express this in the config file...maybe something like this?

terminal_font = 1:6x13 4:6x10 8:5x8

The semantics are "6x13 is used if there are less than four windows. 6x10 is used if there are at least four windows, but less than eight. 5x8 is used if there are eight or more." You could also presumably drop the 1: since the first group has no lower limit of window count. On the other hand, maybe having the 1: does the parser a favor, in that it can immediately differentiate this new syntax from the existing "one size fits all" value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions