From 01a3f646122d2bbf8a3e5bda02b3964e97cdec06 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Thu, 1 Dec 2022 16:18:44 +0100 Subject: [PATCH] Update 'xmobar' config --- .xmonad/xmonad.hs | 50 ++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 7311d20..d04a911 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -30,37 +30,39 @@ import XMonad.Util.Ungrab -- Statusbar myXmobarPP :: PP -myXmobarPP = def - { ppSep = tertiaryColor " | " - , ppCurrent = brackitify - , ppHidden = secondaryColor - , ppHiddenNoWindows = tertiaryColor - , ppUrgent = red . wrap (yellow "!") (yellow "!") - , ppLayout = \l -> case l of "Tall" -> "[]=" - "Magnifier Tall" -> "[]+" - "Magnifier (off) Tall" -> "[]=" - "Magnifier Mirror Tall" -> "+[]" - "Magnifier (off) Mirror Tall" -> "=[]" - "Full" -> "[ ]" - "ThreeCol" -> "|||" - _ -> l - , ppTitle = shorten 80 - , ppTitleSanitize = xmobarStrip - , ppOrder = \[ws, l, _, wins] -> [ws, l, wins] - , ppExtras = [logTitles formatFocused formatUnfocused] +myXmobarPP = + def + { ppSep = tertiaryColor " | ", + ppCurrent = brackitify, + ppHidden = secondaryColor, + ppHiddenNoWindows = tertiaryColor, + ppUrgent = red . wrap (yellow "!") (yellow "!"), + ppLayout = \l -> case l of + "Tall" -> "[]=" + "Magnifier Tall" -> "[]+" + "Magnifier (off) Tall" -> "[]=" + "Magnifier Mirror Tall" -> "+[]" + "Magnifier (off) Mirror Tall" -> "=[]" + "Full" -> "[ ]" + "ThreeCol" -> "|||" + _ -> l, + ppTitle = shorten 80, + ppTitleSanitize = xmobarStrip, + ppOrder = \[ws, l, _, wins] -> [ws, l, wins], + ppExtras = [logTitles formatFocused formatUnfocused] } where brackitify = wrap "[" "]" - formatFocused = secondaryColor . brackitify . ppWindow + formatFocused = secondaryColor . brackitify . ppWindow formatUnfocused = tertiaryColor . ppWindow ppWindow = xmobarRaw . (\w -> if null w then "Untitled" else w) . shorten 16 - primaryColor = xmobarColor "#eeeeee" "" - secondaryColor = xmobarColor "#aaaaaa" "" - tertiaryColor = xmobarColor "#888888" "" - yellow = xmobarColor "#ff0" "" - red = xmobarColor "#ff5555" "" + primaryColor = xmobarColor "#000000" "" + secondaryColor = xmobarColor "#333333" "" + tertiaryColor = xmobarColor "#555555" "" + yellow = xmobarColor "#ff0" "" + red = xmobarColor "#ff5555" "" -- Shift to workspace and view workspace shiftAndView id = doF (W.view id) <> doF (W.shift id)