[xmonad] doFullFloat keybinding?

Pablo Olmos de Aguilera C. pablo at glatelier.org
Sun Jul 15 00:13:38 CEST 2012

On 14 July 2012 14:21, Audun Skaugen <audunskaugen at gmail.com> wrote:
> På Tue, 10 Jul 2012 10:23:23 +0200, skrev 1126
> <mailinglists at elfsechsundzwanzig.de>:
>> Hello List!
>> I have a WS devoted to reading PDFs and alike and in my manageHook config
>> stands
>> the following:
>>                , className =? "Evince" --> doFullFloat
>> This is, because I like my two xmobars (top and bottom) to disappear, when
>> reading a paper such things. But: When evince is FullFloating I got
>> problems
>> when opening more than one instance of it, like a second paper. It just
>> lets the
>> first one disappear under the freshly opened one.
>> What I would like to have is a keybinding to switch FullFloating on and
>> off. Is
>> this possible and if so, how? (By the way: another solution - maybe even a
>> better one - would be to tell xmonad that if I hit F11 (go fullscreen) in
>> evince,
>> that this windows should be above the xmobars and should take the whole
>> screen.
>> Like VLC does.)
>> I couldn't find anything about it, I'm sorry for the noise if I just
>> sucked at
>> Google-ing ;)
> Why not skip floating the window, and use evince's existing fullscreen
> mechanism, which is already bound to F11?
> Sadly, this won't work out of the box. But using the
> XMonad.Layout.Fullscreen module you can get it to work. Instructions are
> provided in the module documentation:
> http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-Fullscreen.html
> The fullscreenFocus modifier is my choice. Note that if you put the
> fullscreen layout modifier before avoidStruts, the fullscreen window will
> cover xmobar, and if you put it after it won't.
> Mail me if you need more help.

Even better... if you are using extended window manager hints
(X.H.EwmhDesktops), which is likely. It already manage an event hook
that can do that job for you. I just added fullscreenEventHook to
eventHook like this:

import XMonad.Hooks.EwmhDesktops

myEventHook = do

, eventHook = myEventHook


myEventHook = ewmhDesktopsEventHook <+> fullscreenEventHook

(both work, I dunno if some of them is better)

Pablo Olmos de Aguilera Corradini - @PaBLoX
Linux User: #456971 - http://counter.li.org/

More information about the xmonad mailing list