From 1539f68a9a5297dff073cc062a1baf14458153f5 Mon Sep 17 00:00:00 2001 From: Juraj Hercek Date: Wed, 9 Jan 2008 16:49:23 +0100 Subject: Extended PP with sorting algorithm specification and added xinerama sorting algorithm - idea is to specify sorting algorithm from user's xmonad.hs - xinerama sorting algorithm produces same ordering as pprWindowSetXinerama - default ppSort is set to getSortByTag, so the default functionality is the same as it was before darcs-hash:20080109154923-69f16-2b9674eab322c2cac47698a66402cecae6abe253.gz --- XMonad/Hooks/DynamicLog.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'XMonad/Hooks/DynamicLog.hs') diff --git a/XMonad/Hooks/DynamicLog.hs b/XMonad/Hooks/DynamicLog.hs index d6ab9eb..d949a85 100644 --- a/XMonad/Hooks/DynamicLog.hs +++ b/XMonad/Hooks/DynamicLog.hs @@ -108,7 +108,7 @@ dynamicLogWithPP :: PP -> X () dynamicLogWithPP pp = do winset <- gets windowset urgents <- readUrgents - sort' <- getSortByTag + sort' <- ppSort pp -- layout description let ld = description . S.layout . S.workspace . S.current $ winset -- workspace list @@ -200,6 +200,7 @@ data PP = PP { ppCurrent, ppVisible , ppLayout :: String -> String , ppOrder :: [String] -> [String] , ppOutput :: String -> IO () + , ppSort :: X ([WindowSpace] -> [WindowSpace]) } -- | The default pretty printing options, as seen in dynamicLog @@ -215,6 +216,7 @@ defaultPP = PP { ppCurrent = wrap "[" "]" , ppLayout = id , ppOrder = id , ppOutput = putStrLn + , ppSort = getSortByTag } -- | Settings to emulate dwm's statusbar, dzen only -- cgit v1.2.3