[xmonad] workspace switching and Xinerama
byorgey at seas.upenn.edu
Tue Jan 27 16:51:55 EST 2009
On Tue, Jan 27, 2009 at 12:54:00PM +0100, Karl Hasselström wrote:
> On 2009-01-26 11:32:25 -0500, Brent Yorgey wrote:
> > Hmm, that's a tricky one. It should be possible in theory, but you
> > would need to implement something pretty low-level to make it work,
> > maybe even a brand new layout modifier based on the WindowNavigation
> > one. This could make a nice project for someone.
> > The problem is that there's no way (currently) for the
> > WindowNavigation layout modifier to report what it did (whether it
> > actually moved the focus to a different window or not), so no way to
> > take another action conditioned on that result.
> Yeah, I thought that might be the case. A bit over my head at this
> point, though -- I still haven't understood how the typing works with
> sendMessage, for example. :-/ And I guess what has to be done is
> provide a way for sendMessage to return stuff? Hmm, I guess that could
> be faked with side effects in the X monad, but that doesn't seem
Actually, I was wrong! Check out the new
XMonad.Actions.MessageFeedback, which was just applied in darcs. It
lets you send a message and find out whether the message was
handled---which, if WindowNavigation works at all in a sane manner,
should tell you whether the movement command actually had any effect.
You should be able to use this to pretty easily construct an action
that first sends a motion command for WindowNavigation, and then
conditionally does a nextScreen action or whatever, based on whether
WindowNavigation responded to the message.
More information about the xmonad