Update 'xmobar' config

master
Hektor Misplon 2022-12-01 16:18:44 +01:00
parent 671e9ed919
commit 01a3f64612
1 changed files with 26 additions and 24 deletions

View File

@ -30,37 +30,39 @@ import XMonad.Util.Ungrab
-- Statusbar -- Statusbar
myXmobarPP :: PP myXmobarPP :: PP
myXmobarPP = def myXmobarPP =
{ ppSep = tertiaryColor " | " def
, ppCurrent = brackitify { ppSep = tertiaryColor " | ",
, ppHidden = secondaryColor ppCurrent = brackitify,
, ppHiddenNoWindows = tertiaryColor ppHidden = secondaryColor,
, ppUrgent = red . wrap (yellow "!") (yellow "!") ppHiddenNoWindows = tertiaryColor,
, ppLayout = \l -> case l of "Tall" -> "[]=" ppUrgent = red . wrap (yellow "!") (yellow "!"),
"Magnifier Tall" -> "[]+" ppLayout = \l -> case l of
"Magnifier (off) Tall" -> "[]=" "Tall" -> "[]="
"Magnifier Mirror Tall" -> "+[]" "Magnifier Tall" -> "[]+"
"Magnifier (off) Mirror Tall" -> "=[]" "Magnifier (off) Tall" -> "[]="
"Full" -> "[ ]" "Magnifier Mirror Tall" -> "+[]"
"ThreeCol" -> "|||" "Magnifier (off) Mirror Tall" -> "=[]"
_ -> l "Full" -> "[ ]"
, ppTitle = shorten 80 "ThreeCol" -> "|||"
, ppTitleSanitize = xmobarStrip _ -> l,
, ppOrder = \[ws, l, _, wins] -> [ws, l, wins] ppTitle = shorten 80,
, ppExtras = [logTitles formatFocused formatUnfocused] ppTitleSanitize = xmobarStrip,
ppOrder = \[ws, l, _, wins] -> [ws, l, wins],
ppExtras = [logTitles formatFocused formatUnfocused]
} }
where where
brackitify = wrap "[" "]" brackitify = wrap "[" "]"
formatFocused = secondaryColor . brackitify . ppWindow formatFocused = secondaryColor . brackitify . ppWindow
formatUnfocused = tertiaryColor . ppWindow formatUnfocused = tertiaryColor . ppWindow
ppWindow = xmobarRaw . (\w -> if null w then "Untitled" else w) . shorten 16 ppWindow = xmobarRaw . (\w -> if null w then "Untitled" else w) . shorten 16
primaryColor = xmobarColor "#eeeeee" "" primaryColor = xmobarColor "#000000" ""
secondaryColor = xmobarColor "#aaaaaa" "" secondaryColor = xmobarColor "#333333" ""
tertiaryColor = xmobarColor "#888888" "" tertiaryColor = xmobarColor "#555555" ""
yellow = xmobarColor "#ff0" "" yellow = xmobarColor "#ff0" ""
red = xmobarColor "#ff5555" "" red = xmobarColor "#ff5555" ""
-- Shift to workspace and view workspace -- Shift to workspace and view workspace
shiftAndView id = doF (W.view id) <> doF (W.shift id) shiftAndView id = doF (W.view id) <> doF (W.shift id)