[xmonad] How to organize myLayoutHook?
Pablo Olmos de Aguilera C.
pablo at glatelier.org
Wed Oct 17 05:47:52 CEST 2012
On 16 October 2012 23:38, Jeffrey David Johnson <jefdaj at gmail.com> wrote:
> Most parts of my xmonad.hs have reasonably simple types:
>
> myXPConfig :: XPConfig
> myKeys :: XConfig Layout -> M.Map (KeyMask, KeySym) (X ())
> myManageHook :: ManageHook
> myLogHook :: Handle -> X ()
> myWorkspaces :: [WorkspaceId]
> etc.
>
> But myLayoutHook is uniquely complicated. Here's the current version:
>
> myLayoutHook = avoidStruts
> $ smartBorders
> $ onWorkspace "4:gimp" gimp
> $ modWorkspace "1:admin" (workspaceDir "~/dotfiles")
> $ all
>
> where
> all = Full ||| tall ||| Grid ||| wide
>
> tall = named "tall" $ FixedColumn 1 20 80 10
> wide = named "wide" $ Mirror $ tall
> gimp = named "gimp" $ withIM (0.15) (Role "gimp-toolbox")
> $ reflectHoriz
> $ withIM (0.25) (Role "gimp-dock")
> $ all
I don't find your layout specially complicated...
> And here's its type:
>
> myLayoutHook
> :: XMonad.Layout.LayoutModifier.ModifiedLayout
> AvoidStruts
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> SmartBorder
> (PerWorkspace
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> XMonad.Layout.Renamed.Rename
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> AddRoster
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> Reflect
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> AddRoster
> (NewSelect
> Full
> (NewSelect
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> XMonad.Layout.Renamed.Rename FixedColumn)
> (NewSelect
> Grid
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> XMonad.Layout.Renamed.Rename
> (Mirror
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> XMonad.Layout.Renamed.Rename FixedColumn))))))))))
> (PerWorkspace
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> WorkspaceDir
> (NewSelect
> Full
> (NewSelect
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> XMonad.Layout.Renamed.Rename FixedColumn)
> (NewSelect
> Grid
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> XMonad.Layout.Renamed.Rename
> (Mirror
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> XMonad.Layout.Renamed.Rename
> FixedColumn)))))))
> (NewSelect
> Full
> (NewSelect
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> XMonad.Layout.Renamed.Rename FixedColumn)
> (NewSelect
> Grid
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> XMonad.Layout.Renamed.Rename
> (Mirror
> (XMonad.Layout.LayoutModifier.ModifiedLayout
> XMonad.Layout.Renamed.Rename
> FixedColumn)))))))))
> Window
>
> Can that be simplified at all? I find myself wanting to add more
> workspace-specific rules, like workspaceDirs or different layouts, but the
> changes are hard to reason about and always seem to break something.
I'm a newbie on xmonad, and a totally noob on haskell, but I haven't
seen a single layouthook in a lot of (important) xmonad configs around
the web that holds a type. Prolly for the same reason you are stating.
Regards,
--
Pablo Olmos de Aguilera Corradini - @PaBLoX
http://www.glatelier.org/
http://about.me/pablox/
http://www.linkedin.com/in/pablooda/
Linux User: #456971 - http://counter.li.org/
More information about the xmonad
mailing list