Limbic~Region has asked for the wisdom of the Perl Monks concerning the following question:
Obviously the last one is somewhat of personal preference so bonus points to an algorithm that has sane defaults but allows it to be configurable. The assumption is that such an algorithm already exists because of windows managers but it seems like a fun diversion.
My initial idea is below though I only spent about 30 seconds thinking about it.
Start out using the entire screen width for each xterm and just dividing the height amongst the number of windows. If the height of each window is less than some critical number, divide the screen in half vertically and repeat. If the height of each window is still less then the threshold, divide the screen into thirds vertically and repeat (ad nausea).
Obviously if the division does not come out evenly the bottom row has the odd windows divided evenly across the entire width of the screen.
Can you come up with a good algorithm for this (keeping in mind the bonus)?
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Fitting N Xterms On An X by Y screen
by ig (Vicar) on Jun 05, 2009 at 02:16 UTC | |
|
Re: Fitting N Xterms On An X by Y screen
by JavaFan (Canon) on Jun 05, 2009 at 07:52 UTC | |
by Anonymous Monk on Jun 05, 2009 at 10:01 UTC | |
by Khisanth (Novice) on Jun 05, 2009 at 17:59 UTC | |
by BrowserUk (Patriarch) on Jun 06, 2009 at 02:04 UTC | |
|
Re: Fitting N Xterms On An X by Y screen
by spx2 (Deacon) on Jun 05, 2009 at 10:13 UTC | |
|
Re: Fitting N Xterms On An X by Y screen
by JavaFan (Canon) on Jun 05, 2009 at 12:33 UTC | |
by Limbic~Region (Chancellor) on Jun 05, 2009 at 13:33 UTC | |
by jorgegv (Novice) on Jun 05, 2009 at 15:20 UTC | |
|
Re: Fitting N Xterms On An X by Y screen
by bsb (Priest) on Jun 05, 2009 at 23:33 UTC |