
Hi Jeremy,
Your workspaces look very interesting to say the least. Would you mind explaining your philosophy for them? Also, I like the different colors for each.
Well, I'm using the DynamicWorkspaces extension to be able to add workspaces in a manner similar to wmii. Those 'dynamically' added WSes usually don't get a color and just take the default, though it would not be an issue to provide them with one. I just happen to have run out of attractive colors… Workspaces are strictly 'semantic', meaning I'm using one workspace for one task. I think that's used a lot in the tiling WM crowd. The names should be mostly self-explanatory, except 'comm' being an abbreviation for 'communication', hosting my IRC sessions and mail (and news, but I rarely use it these days). About the colors: that's a nice little hack based on a Data.Map that associates workspace names with colors. I thank shepheb of #xmonad for helping me working this out. Here's what I ended up doing:
wsCode = "code" wsWeb = "web" wsCode'= "code'" wsMail = "comm" wsDoc = "doc" wsWork = "work" wsWrite= "write" wsTest = "test" wsMisc = "misc" wsLog = "logs" wsRead = "read"
-- Workspace colors map wsCols :: M.Map WorkspaceId [Char] wsCols = M.fromList $ [ (wsCode, "#aaccee") , (wsWeb, "#eebbaa") , (wsCode', "#aa99ee") , (wsMail, "#bb99aa") , (wsDoc, "#bbdd99") , (wsWork, "#edcd88") , (wsTest, "#ee8844") , (wsMisc, "grey90") , (wsLog, "#ee9988") , (wsWrite, "#aaeebb") , (wsRead, "#888888") ]
-- Workspaces, in the order xmonad knows them myWorkspaces = [ wsCode , wsCode' , wsMail , wsWeb , wsDoc , wsTest , wsWrite , wsRead , wsWork , wsLog , wsMisc ]
-- Graphical setup myBgColor = "#0a0c0f" myFgColor = "#aacccc" myBgColor' = "'" ++ myBgColor ++ "'" -- quote-escaped for dzen2 myFgColor' = "'" ++ myFgColor ++ "'" -- quote-escaped for dzen2 myFont = "'-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*'" myNormalBorderColor = myBgColor myFocusedBorderColor = myFgColor myBitmapsDir = "/home/aleks/etc/dzen2" myHighlightFG = "#eeeeee" myHighlightBG = "#3a5a5a"
myPP h = defaultPP { ppCurrent = wrap ("^bg(" ++ myHighlightBG ++ ") ^fg("++ myHighlightFG ++")") (" ^bg()") , ppHidden = (\wsName -> dzenColor ( case (M.lookup wsName wsCols) of Nothing -> myFocusedBorderColor Just color -> color) "" wsName) , ppLayout = (\lName -> "^bg()^fg()" ++ case lName of "Tall" -> " ^i(" ++ myBitmapsDir ++ "/tall.xbm) " "Mirror Tall" -> " ^i(" ++ myBitmapsDir ++ "/mirrortall.xbm) " "Full" -> " ^i(" ++ myBitmapsDir ++ "/full.xbm) " "Dishes 2 (1%6)" -> " ^i(" ++ myBitmapsDir ++ "/dishes.xbm) " "Mirror Dishes 2 (1%6)" -> " ^i(" ++ myBitmapsDir ++ "/dishes_mirrored.xbm) " otherwise -> lName) , ppSep = " " , ppTitle = dzenColor myHighlightFG myHighlightBG . wrap " " "^bg(black)" . staticString 100 , ppOutput = hPutStrLn h -- , ppExtras = logLoad : L.date ("^pa(1250)^bg() %a, %b %d ^fg(white)%H:%M^fg()") : [] }
I also had the idea of using the foreground color for the WSes as a background color when they are selected, but I found that to be too distracting. Best, Aleks