[xmonad] [patch] XMonad.Hooks.InsertPosition per workspace

Adam Vogt vogt.adam at gmail.com
Thu Sep 8 18:24:15 CEST 2011


Hi Frank,

Thanks for the patch. Your example can be written using 
XMonad.Hooks.ManageHelpers and the existing XMonad.Hooks.InsertPosition:

manageHook =
  composeOne
    [currentWs =? "5:www" -?> insertPosition Below Older
     return True          -?> insertPosition Below Newer]
  <+> myManageHook

Considering the above, I think you can implement insertPositionPerWorkspace 
without having to add to the already confusing functions in insertPosition:

-- insertPositionPerWorkspace :: [(WorkspaceId, (Position, Focus))]
--    -> Position -> Focus -> ManageHook
insertPositionPerWorkspace wss p1 f1 = do
    ws <- currentWs
    uncurry insertPosition $ fromMaybe (p1,f1) (lookup ws wss)

Let me know if this insertPositionPerWorkspace above can be added instead 
of your patch.

Cheers,
Adam

* On Monday, September 05 2011, Frank Busse wrote:

>Hi,
>
>a small patch that might be useful for others. It adds
>insertPositionPerWorkspace to XMonad.Hooks.InsertPosition and allows to
>define insertPosition for a particular workspace.
>
>Example:
>--
>manageHook = insertPositionPerWorkspace
>[("5:www",(Below,Older))] Below Newer <+> myManageHook
>--
>
>"5:www" is my tabbed workspace for uzbl-browser. A new window
>opens in "background" and the focus remains on the old window, whereas
>in every other workspace the new window is focused.
>
>
>Kind regards,
>
>Frank


>_______________________________________________
>xmonad mailing list
>xmonad at haskell.org
>http://www.haskell.org/mailman/listinfo/xmonad




More information about the xmonad mailing list