From 68a7b5426d4e74ecb5494c9af8e73aa104f31465 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Thu, 20 Feb 2020 00:04:44 -0500 Subject: [PATCH] ENH add topbar to layouts --- xmonad.hs | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/xmonad.hs b/xmonad.hs index e4c30a7..3759998 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -25,7 +25,9 @@ import XMonad.Hooks.ManageDocks -- import XMonad.Layout.IndependentScreens import XMonad.Hooks.ManageHelpers -- import XMonad.Layout.BinarySpacePartition (emptyBSP) +import XMonad.Layout.Named import XMonad.Layout.NoBorders +import XMonad.Layout.NoFrillsDecoration import XMonad.Layout.PerWorkspace -- import XMonad.Layout.ResizableTile (ResizableTall(..)) -- import XMonad.Layout.ToggleLayouts (ToggleLayout(..), toggleLayouts) @@ -57,10 +59,34 @@ main = do -------------------------------------------------------------------------------- +myTopBarTheme = def + { fontName = myFont + , inactiveBorderColor = "#999999" + , inactiveColor = "#999999" + , inactiveTextColor = "#999999" + , activeBorderColor = "#eeeeee" + , activeColor = "#eeeeee" + , activeTextColor = "#eeeeee" + -- , urgentBorderColor = red + -- , urgentTextColor = yellow + , decoHeight = 20 + } + myWorkspaces = map show [1..10 :: Int] ++ ["VM"] -myLayouts = onWorkspace "VM" (noBorders Full) $ - (avoidStruts $ layoutHook def) +myLayouts = onWorkspace "VM" (noBorders Full) + $ tall ||| full + where + addTopBar = noFrillsDeco shrinkText myTopBarTheme + tall = named "Tall" + $ avoidStruts + $ addTopBar + $ noBorders + $ Tall 1 0.03 0.5 + full = named "Full" + $ avoidStruts + $ noBorders + $ Full -- | Format workspace and layout in loghook -- The format will be like "[<1> 2 3] 4 5 | LAYOUT" where each digit