mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 12:41:52 -07:00
Allow the user to change the order of workspaces, layout, title
This commit is contained in:
@@ -81,7 +81,7 @@ dynamicLogWithPP pp = do
|
|||||||
-- window title
|
-- window title
|
||||||
wt <- withWindowSet $ maybe (return "") (fmap show . getName) . S.peek
|
wt <- withWindowSet $ maybe (return "") (fmap show . getName) . S.peek
|
||||||
|
|
||||||
io . putStrLn . sepBy (ppSep pp) $
|
io . putStrLn . sepBy (ppSep pp) . ppOrder pp $
|
||||||
[ ws
|
[ ws
|
||||||
, ppLayout pp ld
|
, ppLayout pp ld
|
||||||
, ppTitle pp wt
|
, ppTitle pp wt
|
||||||
@@ -147,7 +147,8 @@ data PP = PP { ppCurrent, ppVisible
|
|||||||
, ppHidden, ppHiddenNoWindows :: WorkspaceId -> String
|
, ppHidden, ppHiddenNoWindows :: WorkspaceId -> String
|
||||||
, ppSep :: String
|
, ppSep :: String
|
||||||
, ppTitle :: String -> String
|
, ppTitle :: String -> String
|
||||||
, ppLayout :: String -> String }
|
, ppLayout :: String -> String
|
||||||
|
, ppOrder :: [String] -> [String] }
|
||||||
|
|
||||||
-- | The default pretty printing options, as seen in dynamicLog
|
-- | The default pretty printing options, as seen in dynamicLog
|
||||||
defaultPP :: PP
|
defaultPP :: PP
|
||||||
@@ -157,11 +158,13 @@ defaultPP = PP { ppCurrent = wrap "[" "]"
|
|||||||
, ppHiddenNoWindows = const ""
|
, ppHiddenNoWindows = const ""
|
||||||
, ppSep = " : "
|
, ppSep = " : "
|
||||||
, ppTitle = const ""
|
, ppTitle = const ""
|
||||||
, ppLayout = id }
|
, ppLayout = id
|
||||||
|
, ppOrder = id }
|
||||||
|
|
||||||
-- | The options that sjanssen likes to use, as an example. Note the use of
|
-- | The options that sjanssen likes to use, as an example. Note the use of
|
||||||
-- 'xmobarColor' and the record update on defaultPP
|
-- 'xmobarColor' and the record update on defaultPP
|
||||||
sjanssenPP :: PP
|
sjanssenPP :: PP
|
||||||
sjanssenPP = defaultPP { ppCurrent = xmobarColor "white" "#ff000000"
|
sjanssenPP = defaultPP { ppCurrent = xmobarColor "white" "#ff000000"
|
||||||
, ppTitle = xmobarColor "#00ee00" ""
|
, ppTitle = xmobarColor "#00ee00" ""
|
||||||
|
, ppOrder = reverse
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user