diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2015-12-14 23:32:46 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2015-12-14 23:32:46 +0100 |
commit | 40a2daf1f359bd2bf4290aaa969532d2e8e81e72 (patch) | |
tree | 370da7f64e57fb9f0a251176ad91a92181b88b63 | |
parent | 2983b5da339d8578c5f5e97dc35d154f1468946d (diff) | |
download | xmonad-config-40a2daf1f359bd2bf4290aaa969532d2e8e81e72.tar.gz xmonad-config-40a2daf1f359bd2bf4290aaa969532d2e8e81e72.tar.xz xmonad-config-40a2daf1f359bd2bf4290aaa969532d2e8e81e72.zip |
Use def for all default values
> Use of data-default allows using def where previously you had to write
> defaultConfig, defaultXPConfig defaultFoo.
-rw-r--r-- | xmonad.hs | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -108,20 +108,20 @@ main = do -- end of your custom hooks (esp. the startup hook) and this would -- overwrite the setWMName "LG3D" and some Java apps will not work. $ withUrgencyHook myDzenUrgencyConfig - $ defaultConfig { modMask = modM hostname - , terminal = term - , borderWidth = 1 - , normalBorderColor = "#545454" - , focusedBorderColor = "#A00000" - , logHook = myLogHook dzenStatusFile - , manageHook = myManageHook - , keys = \c -> mkKeymap c $ myKeys c hostname - , mouseBindings = \c -> M.union (M.fromList $ myMouse (modM hostname) c) $ mouseBindings defaultConfig c - , layoutHook = myLayout - , workspaces = topics - , handleEventHook = myEventHook - , startupHook = myStartupHook - } + $ def { modMask = modM hostname + , terminal = term + , borderWidth = 1 + , normalBorderColor = "#545454" + , focusedBorderColor = "#A00000" + , logHook = myLogHook dzenStatusFile + , manageHook = myManageHook + , keys = \c -> mkKeymap c $ myKeys c hostname + , mouseBindings = \c -> M.union (M.fromList $ myMouse (modM hostname) c) $ mouseBindings def c + , layoutHook = myLayout + , workspaces = topics + , handleEventHook = myEventHook + , startupHook = myStartupHook + } --}}} @@ -224,7 +224,7 @@ notNspHiddenWS = do notNsp <- notNspWS --{{{ Themes -myPP statusFile = namedScratchpadFilterOutWorkspacePP $ defaultPP +myPP statusFile = namedScratchpadFilterOutWorkspacePP $ def { ppCurrent = wrap "^fg(#FF0000) " " " , ppVisible = wrap "^fg(#0000FF) " " " , ppHiddenNoWindows = \_ -> "" @@ -258,7 +258,7 @@ myPP statusFile = namedScratchpadFilterOutWorkspacePP $ defaultPP | otherwise = prefix:l alexTheme :: Theme -alexTheme = defaultTheme +alexTheme = def { inactiveBorderColor = "#545454" , activeBorderColor = "#6E0000" , activeColor = "#6E0000" @@ -270,13 +270,13 @@ alexTheme = defaultTheme } alexXPConfig :: XPConfig -alexXPConfig = P.defaultXPConfig +alexXPConfig = def { P.font = font , P.height = 20 } historyGridConfig :: GSConfig String -historyGridConfig = defaultGSConfig +historyGridConfig = def { gs_cellheight = 50 , gs_cellwidth = 300 , gs_navigate = navNSearch @@ -293,14 +293,14 @@ topicsColorizer topic selected empty = null $ W.integrate' $ W.stack topic topicsGridConfig :: GSConfig (W.Workspace tag layout stack) -topicsGridConfig = defaultGSConfig +topicsGridConfig = def { gs_navigate = navNSearch , gs_font = font , gs_colorizer = topicsColorizer } confirmConfig :: GSConfig Bool -confirmConfig = defaultGSConfig +confirmConfig = def { gs_cellheight = 150 , gs_cellwidth = 300 , gs_cellpadding = 50 |