Tweaked layout selection to only display the available layouts
Added dzen2 popups at useful times
Added layout options to "web" and "terminal" workspaces
IMMB6ZKLCUL7UEXN4RGAGXWFIEOAYGBZ73C3R3G2XZX72D4RFMBAC
myDzenConfig :: DzenConfig
myDzenConfig = (timeout 1 >=> (onCurr (vCenter 100)) >=> (onCurr (hCenter 300)) >=> XMonad.Util.Dzen.font "xft:Source Code Pro:size=20:antialias=true")
makeLayoutList [] = []
makeLayoutList (l:ls) = (l,l):(makeLayoutList ls)
changeLayout a =
case a of
Just x -> sendMessage $ JumpToLayout x
_ -> error "this shouldn't happen"
--mySTConfig = STC {
-- st_font = "Source Code Pro",
-- st_bg = "black",
-- st_fg = "red"
--}
-- This is the currently used layout change
-- activated with Meta+;
-- It displays the relevant list of layouts for the current display
-- TODO: show new layout as a popup message
nchooseLayout :: GSConfig String -> X ()
nchooseLayout conf = do
loName <- wrapped_loName
wsName <- wrapped_wsName
a <- gridselect conf $ makeLayoutList $
cycleFront loName $ case wsName of
"web" -> webList
"terminal" -> terminalList
"im" -> imList
"images" -> imagesList
_ -> defaultList
case a of
Just x -> do
sendMessage $ JumpToLayout x
dzenConfig myDzenConfig x
return ()
where
wrapped_loName :: X [Char]
wrapped_loName = liftM (fromMaybe "") logLayout
wrapped_wsName :: X [Char]
wrapped_wsName = liftM (fromMaybe "") logCurrent
cycleFront :: String -> [String] -> [String]
cycleFront n l = n:(Data.List.delete n l)
basicList = ["Accordion", "Full", "Tabbed", "Spiral", "Wide", "ThreeWide", "WideAccordion", "Writing", "WritingNew", "Gridding", "TwoPane", "OneBig"]
defaultList = ["Tall", "ThreeCol"] ++ basicList
webList = ["Tabbed", "Full", "TwoPane"]
terminalList = ["Tall", "ThreeCol", "Full"]
imList = ["im"]
imagesList = ["gimp", "Tall", "ThreeCol"] ++ basicList
((mod4Mask, numPadKeys !! 1), windows $ W.greedyView "web" ),
((mod4Mask, numPadKeys !! 2), windows $ W.greedyView "terminal" ),
((mod4Mask, numPadKeys !! 3), windows $ W.greedyView "1" ),
((mod4Mask, numPadKeys !! 4), windows $ W.greedyView "2" ),
((mod4Mask, numPadKeys !! 5), windows $ W.greedyView "3" ),
((mod4Mask, numPadKeys !! 6), windows $ W.greedyView "4" ),
((mod4Mask, numPadKeys !! 7), windows $ W.greedyView "5" ),
((mod4Mask, numPadKeys !! 8), windows $ W.greedyView "6" ),
((mod4Mask, numPadKeys !! 9), windows $ W.greedyView "images" ),
((mod4Mask, numPadKeys !! 1), switchWorkspace "web" ),
((mod4Mask, numPadKeys !! 2), switchWorkspace "terminal" ),
((mod4Mask, numPadKeys !! 3), switchWorkspace "1" ),
((mod4Mask, numPadKeys !! 4), switchWorkspace "2" ),
((mod4Mask, numPadKeys !! 5), switchWorkspace "3" ),
((mod4Mask, numPadKeys !! 6), switchWorkspace "4" ),
((mod4Mask, numPadKeys !! 7), switchWorkspace "5" ),
((mod4Mask, numPadKeys !! 8), switchWorkspace "6" ),
((mod4Mask, numPadKeys !! 9), switchWorkspace "images" ),
((mod4Mask, xK_1), switchWorkspace "web" ),
((mod4Mask, xK_2), switchWorkspace "terminal" ),
((mod4Mask, xK_3), switchWorkspace "1" ),
((mod4Mask, xK_4), switchWorkspace "2" ),
((mod4Mask, xK_5), switchWorkspace "3" ),
((mod4Mask, xK_6), switchWorkspace "4" ),
((mod4Mask, xK_7), switchWorkspace "5" ),
((mod4Mask, xK_8), switchWorkspace "6" ),
((mod4Mask, xK_9), switchWorkspace "images" ),
((mod4Mask, xK_grave), switchWorkspace "IM" ),
((mod4Mask, xK_1), windows $ W.greedyView "web" ),
((mod4Mask, xK_2), windows $ W.greedyView "terminal" ),
((mod4Mask, xK_3), windows $ W.greedyView "1" ),
((mod4Mask, xK_4), windows $ W.greedyView "2" ),
((mod4Mask, xK_5), windows $ W.greedyView "3" ),
((mod4Mask, xK_6), windows $ W.greedyView "4" ),
((mod4Mask, xK_7), windows $ W.greedyView "5" ),
((mod4Mask, xK_8), windows $ W.greedyView "6" ),
((mod4Mask, xK_9), windows $ W.greedyView "images" ),
((mod4Mask, xK_grave), windows $ W.greedyView "IM" ),
, template = "%mpris2% :: %StdinReader% }{ %cpu% | %memory% * %swap% | %loadavg% -- %username%@%hostname% <fc=#ee9a00>%date% %time%</fc> | %EGPF%"
, template = " %StdinReader% }{ %cpu% | %memory% * %swap% | %loadavg% -- %username%@%hostname% <fc=#ee9a00>%date% %time%</fc> | %EGPF%"