On Sat, Apr 13, 2002 at 07:43:49AM -0700, Sean 'Shaleh' Perry wrote:
> On 13-Apr-2002 Moe wrote:
> > Hi out there,
> > 
> > i'd like to propose a few enhancements to window placement
> > in blackbox:
> > 
> > 1. Fully automatic mode ("Grid mode")
> > 
> >    Sometimes I'm really not in a mood to touch my mouse and
> >    move windows around.  It'd be cool if blackbox had an option
> >    "no overlap" (or something) that makes it automatically resize
> >    all windows for them all to remain visible even when there
> >    is no pixelspace left and a new window pops up.
> >        Especially when working with a large number of xterms I'd often
> >        prefer to handle my screen more like a grid (moving the border
> >        between two windows shrinks one and enlarges the other) than
> >        having to arrange everything manually - never reaching
> >        ultimo satisfaction with the "pixel-waste-ratio".
> >        In that mode there should be a "fix"-flag to be manually
> >        set on windows that are never to be auto-resized.  Also
> >        an option that makes bb consider the currently focus'ed window
> >        always "fixed" seems handy to me.
> 
> This is hard to implement properly.  What happens when the windows on the
> screen are not all of uniform size?

I guessed so.  I was pointed to larswm and ion which kind of do just
that.  It's a bit strange when you have no option to turn it off, tho. ;)
What they basically do is to assign equal screen space to any visible
window.  It's been a while since I looked into larswm so I can't
remember much more of the details.

My idea for a useful sizing algorithm would be to sum up the sizes
of all windows that are not marked "fixed" (never resize) and assign
that sum div by not_fixed_window_count+1 to the new window by default -
shrinking the surrounding windows to create room for the new window.

Ofcourse that thought is not finished, yet. (my brain's on it but
it tends to get really slow on certain kinds of tasks;))

Basically, I think the following guidelines would do
for a polite behaviour:

- It should be avoided to change the relative position of existing
  windows to each other whenever possible (top-right window should
  stay top-right etc).  With "fixed" windows this will usually
  fail.  When re-arranging existing windows the one that last had focus
  should be kept in position [unless it's really in the way;)].

- If a new window arrives and too much space is occupied by
  "fixed" windows, so that there's less than n (= really few;)) pixels
  left for the newcomer, "grid-mode" should automatically exit back to
  normal.

I think avoiding to move around "fixed" windows could get a bit tricky,
generally the other resizing stuff shouldnt be too hard.

Implementing all this is a way beyond my C++ expirience, tho. :(

> > 
> > 2. No Overlap ("the other mode")
> > 
> >    Another nice gimmick to have would be a mode that turns all windows
> >        "invincible".  So when moving or resizing one, you can never cross the
> >        borders of another.  Maybe a Meta-Keycombo would do for this.
> >        (holding CTRL+ALT while resizing or something)
> > 
> 
> interesting idea, does not seem to hard to implement.  Although I tend to
> believe that if the user is performing the action they should be able to see
> the screen and react according ly.  You should be able to implement this
> algorithm with your advanced spatial recognition abilites bestowed by nature. 
> Why add a less well designed engineering solution?

Well, don't you sometimes think stuff like "Now snap to the da*n border
you fu**ing piece of sh** window bas**rd!!"?

Umm..

Okay, maybe I should just change my attitude or buy a better mouse. ;)

> As always, if someone makes a patch, these ideas can at least be reviewed.

I'd like to, but my patches would probably
segfault your gcc..;)


regards!
-- 
,Moe

Reply via email to