[openbox] Openbox Multihead (featuring per-monitor desktops)

Andrew Gallant jamslam at gmail.com
Thu Aug 18 13:33:56 EDT 2011


> I finally got a chance to try this out. For the most part it seems to
> be working. However, one bit of behavior is a bit puzzling.

Thanks for testing it out :-)

> I have two monitors. On the first, I have a single terminal window open,
> the second is empty. If I move the mouse to the empty monitor and try to
> change desktops, it changes the first monitor's desktop instead.

This actually sounds like it is working as I intended. You should be
able to *click* on that empty monitor, and focus should switch to that
desktop. Does that work for you? (If you have a "desktop" window, like
one that KDE might put there, then this won't work.)

> The
> only way I've found to bring focus to the empty monitor (I don't have
> "FocusRoot" bindings installed yet) is to try to change to whatever
> desktop is currently being shown on that monitor

Mouse clicking should work; hopefully that's something you just
haven't tried yet and nothing buggy is happening.

> (I assume this won't
> work if I turn on "greedy" desktops).

Right. It would bring whichever desktop you're switching to to the
current monitor.

> Maybe we could track the "active monitor", updating it whenever a new
> window is selected OR the mouse enters a monitor?

Well, the active monitor should switch if you focus a window. (Greedy
is forcefully disabled from this kind of desktop switching.)

The mouse *entering* the monitor is an interesting idea. Sort of like,
monitor-focus-follows-mouse. I'll definitely experiment with that,
although it will have to wait a few days; I'll be camping this
weekend.

I should mention that the FocusRoot option is intended to make monitor
switching really easy. Perhaps that would work for you in the interim?
(I am not suggesting that monitor-focus-follows-mouse is made useless
by FocusRoot, though.) I like to bind 'Alt-w', 'Alt-e' and 'Alt-r' to
monitors 1, 2 and 3. It should switch monitor focus whether the
monitor is empty or not.

>> I've include a small Python script 'ob-visible-desks' ...
>
> I installed xpyb and your xpyb-utils lib. The ob-visible-desks script
> prints out a single line, but then loses the X connection as soon as
> window focus or the current desktop changes (maybe when any X event is
> received?). I'll try to dig into it more this weekend, but wanted to
> give you a heads up.

Yeah, unfortunately you're going to need xpyb-git or xpyb-ng-git. (I
recommend the latter if it's doable.) The xpyb package is absurdly
outdated and broken.

>> - Develop a pager that works with this new desktop model.
>
> The pager you wrote seems to work, although I'm still on python2.6,
> which doesn't have the { x:y for x,y in ... } construct yet. Easy enough
> to fix, however.

Ah, damn. It'd probably be a good idea to roll my dependencies back to
2.6, because I don't think I'm using anything substantial from 2.7. I
can't say this will be a priority in the immediate future, though.

> Anyway, its definitely a good start!
>
> Take care,
> Brian
>
> P.S. This is all on ubuntu 10.04, so some issues could be due to older
> packages.

Thanks again for taking a stab! I appreciate the feedback :-)

- Andrew


More information about the openbox mailing list