Making fullscreen windows not tiled in xmonad + KDE

1

I understand, that I need to add something like:

composeOne [ isFullscreen -?> doFullFloat ]

to my ManageHook. At least according to this page.

But I'm not really sure where to add it in my xmonad config. My Haskell knowledge is relatively minor and because I'm using xmonad with KDE the config file does not have a very standard look.

My xmonad.hs looks like this:

import XMonad
import XMonad.Config.Kde
import qualified XMonad.StackSet as W -- to shift and float windows
import XMonad.Hooks.ManageHelpers

main = xmonad $ kdeConfig

 { modMask = mod4Mask -- use the Windows button as mod
 , manageHook = manageHook kdeConfig <+> myManageHook
 }
 where
   myManageHook = composeAll . concat $
     [ [ className   =? c --> doFloat           | c <- myFloats]
     , [ title       =? t --> doFloat           | t <- myOtherFloats]
     , [ className   =? c --> doF (W.shift "3") | c <- webApps]
     , [ className   =? c --> doF (W.shift "4") | c <- ircApps]
     ]
   myFloats      = ["MPlayer", "Gimp", "Skype", "Plasma-desktop", "VirtualBox"]
   myOtherFloats = ["alsamixer"]
   webApps       = ["Firefox-bin", "Opera"] -- open on desktop 3
   ircApps       = ["Ksirc"]                -- open on desktop 4

Where ever I try to put it, I just get cryptic error messages, of which Haskell is famous for.

Rene Saarsoo

Posted 2010-02-17T21:46:55.807

Reputation: 365

If you are getting an error from Haskell on code (in the .hs file), then this may well fit over on StackOverflow? (esp. if you include the error) – Michael Easter – 2010-02-21T04:41:49.343

I was thinking of it by myself, but I don't really want to cross-post. Especially now, that it has a bounty open. – Rene Saarsoo – 2010-02-21T12:25:47.440

Answers

1

You can't plug it in directly because the types don't match:

ghci> :t isFullscreen -?> doFullFloat
isFullscreen -?> doFullFloat :: MaybeManageHook
ghci> :t composeAll
composeAll :: [ManageHook] -> ManageHook

Note, however

ghci> :t composeOne 
composeOne :: [MaybeManageHook] -> ManageHook

That takes a list of manage hooks that may or may not run and combines them into one action.

MaybeManageHook also fits nicely with

*Main> :t maybeToDefinite 
maybeToDefinite :: MaybeManageHook -> ManageHook

Add either

, [ maybeToDefinite (isFullscreen -?> doFullFloat) ]

or

, [ composeOne [ isFullscreen -?> doFullFloat ] ]

to the definition of myManageHook.

Greg Bacon

Posted 2010-02-17T21:46:55.807

Reputation: 813