From 2eac61501ed8f1a5fe5d94edfafd35ba5043b898 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:20:28 +0200 Subject: code cleanup --- .xmonad/xmonad.hs | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 7245ad3..c5d4532 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -68,10 +68,10 @@ defaultHost = Host { hName = "unkown" --hostFromName :: (LayoutClass l1 a, LayoutClass l2 a) => HostName -> Host (l1 a) (l2 a) hostFromName h@("vali") = defaultHost { hName = h - , hManageHook = composeOne [ manageScratchTerm - , className =? ".dwb-wrapped" -?> doShift (wsp 2) - , className =? "Chromium" -?> doShift (wsp 2) - ] + , hManageHook = composeOne $ catMaybes [ Just manageScratchTerm + , hCoWsp "web" >>= \wsp -> (className =? ".dwb-wrapped" -?> doShift wsp) + , hCoWsp "web" >>= \wsp -> (className =? "Chromium" -?> doShift wsp) + ] , hWsp = hWsp , hCoWsp = hCoWsp , hLayoutMod = mkMod [ hCoWsp "web" >>= \wsp -> onWorkspace wsp (noBorders Full ||| tabbedLayout tabbedBottomAlways) @@ -104,6 +104,19 @@ spawnBindings conf (k, cmds) = zipWith (\m cmd -> ((modm .|. mod1Mask .|. m, k), manageScratchTerm = resource =? "scratchpad" -?> doRectFloat $ RationalRect (1 % 16) (1 % 16) (7 % 8) (7 % 8) +tabbedLayout t = renamed [Replace "Tabbed"] $ reflectHoriz $ t CustomShrink $ tabbedTheme +tabbedTheme = defaultTheme { activeColor = "black" + , inactiveColor = "black" + , urgentColor = "black" + , activeBorderColor = "white" + , inactiveBorderColor = "#202020" + , urgentBorderColor = "#bb0000" + , activeTextColor = "white" + , inactiveTextColor = "white" + , urgentTextColor = "white" + , decoHeight = 16 + } + main = do xmobarProc <- spawnPipe "xmobar" host <- getHostName >>= return . hostFromName @@ -121,18 +134,6 @@ main = do } layout' = hLayoutMod host $ defaultLayouts defaultLayouts = spiralWithDir East CW (1 % 2) ||| tabbedLayout tabbedBottom ||| noBorders Full ||| simplestFloat - tabbedLayout t = renamed [Replace "Tabbed"] $ reflectHoriz $ t CustomShrink $ tabbedTheme - tabbedTheme = defaultTheme { activeColor = "black" - , inactiveColor = "black" - , urgentColor = "black" - , activeBorderColor = "white" - , inactiveBorderColor = "#202020" - , urgentBorderColor = "#bb0000" - , activeTextColor = "white" - , inactiveTextColor = "white" - , urgentTextColor = "white" - , decoHeight = 16 - } xmobarPP' = xmobarPP { ppOutput = hPutStrLn xmobarProc , ppTitle = shorten 50 , ppSort = (liftM2 (.)) getSortByIndex $ return scratchpadFilterOutWorkspace -- cgit v1.2.3