[xmonad] Multi-head beamer presentations

Wirt Wolff wirtwolff at gmail.com
Mon Jan 11 11:44:04 EST 2010

Excerpts from Ivan Lazar Miljenovic's message of Mon Jan 11 05:34:21 -0700 2010:
> I'm doing a presentation using Beamer [1] for LaTeX.  It allows using
> the second screen for notes by basically creating two-screen wide
> "pages" with the idea of having the entire full screen presentation
> spread across both screens (and the projector only showing one screen).
> Now, this works well for how "traditional" window managers treat
> multi-head as one big workspace, but obviously doesn't work too well for
> xmonad.  Is there any nice way I can do up a key combo or something
> (maybe even a ManageHook?) to have it automatically go floating and
> spread out across both screens (i.e. across the entire visible area)?
> [1] http://latex-beamer.sourceforge.net/

There are a couple of hacks that may help here. If your monitors
are side by side and the same resolution it's simpler, but I'll
assume they differ. Apologies in advance for any arithmetic
mistakes in my examples. XMonad.Hooks.ManageHelpers.doRectFloat can
use height and width fractions greater than one, so using some silly
example screen resolutions you could do something like:

* 6x8 leftOf 16x9, screen tops at same y position
* Launch beamer on the left workspace

import XMonad.Hooks.ManageHelpers
doRectFloat (W.RationalRect 0 0 (22/6) 1) <+> doShift "3"

You could also set up a keybinding to split your two monitors
into two workspaces and another to return them to normal. Beamer
mode would give one workspace spanning the monitors but only as
tall as the highest monitor, the other workspace would take the
remaining space on the taller monitor.

import XMonad.Layout.LayoutScreens

-- split them
layoutScreens 2 (fixedLayout [Rectangle 0 0 22 8, Rectangle 6 8 9 1])

-- back to normal

Hope that helps. Also that PEPM, traveling to it and preparations are
all mostly fun and exciting.

More information about the xmonad mailing list