+-- Switch to next layout with descriptions in desc, other layouts are skipped.
+-- This allows switching to some layouts with mappings but excluding them from
+-- meta-space (which gets mapped to this function). Thanks to aavogt in
+-- #xmonad on Freenode for this function (2010-06-13 12:45 CEST), modified to
+-- take list of layouts to switch to, not layouts to exclude.
+nextLayoutIncluding descs =
+ do broadcastMessage NextLayout
+ d <- gets (description . W.layout . W.workspace . W.current . windowset)
+ if d `elem` descs
+ then refresh
+ else nextLayoutIncluding descs
+