[xmonad] How to organize myLayoutHook?
daniel.trstenjak at gmail.com
Wed Oct 17 09:34:06 CEST 2012
On Tue, Oct 16, 2012 at 11:38:13PM -0700, Jeffrey David Johnson wrote:
> Thanks, that's good to know I'm doing things generally right. Maybe
> a more specific question would help me improve it though... what I'm
> actually trying to do is make a tabular list of workspace properties
> like this:
> myLayoutHook = avoidStruts $ smartBorders $ format
> [ ("admin", "~/dotfiles", (Full, tall, Grid, wide))
> , ("notes" , "~/notes" , (tall, wide) )
> tall = ...
> wide = ...
> format = ???
> And I can't figure out what the format function should be.
Perhaps something like (didn't test it):
myLayoutHook = avoidStruts $ smartBorders $ format
[ ("admin", "~/dotfiles", Full ||| tall ||| Grid ||| wide)
, ("notes" , "~/notes" , tall ||| wide)
tall = ...
wide = ...
defaultWorkspace = tall ||| wide -- or whatever
format (w:) = workspace w
format (w:ws) = workspace w ||| format ws
workspace (name, dir, layouts) = onWorkspace name layouts defaultWorkspace
||| modWorkspace name (workspaceDir dir) defaultWorkspace
More information about the xmonad