From 570e0124f08c4a66c88d7d71ec85c1e7f4fa3838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 26 Aug 2025 09:18:36 +0800 Subject: [PATCH] vanadium/xmobar: factor out color specification --- .../vanadium/home/xmobar/xmobar.hs | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/nix/configurations/vanadium/home/xmobar/xmobar.hs b/nix/configurations/vanadium/home/xmobar/xmobar.hs index c033dc03..d06a1e7d 100644 --- a/nix/configurations/vanadium/home/xmobar/xmobar.hs +++ b/nix/configurations/vanadium/home/xmobar/xmobar.hs @@ -62,20 +62,23 @@ config = (15 &minute) ] , template = - " %XMonadLog% " - <> alignSep config - <> intercalate "|" - [ unwords - [ "[AUA: %arubaClock%]" - , "[DUB: %dublinClock%]" - , "[CDG: %cetClock%]" - , "[TPE: %tstClock%]" - ] - <> " " - , " %RCSS% " - , " %battery%, %powerprofilesctl%) " - , " %hereClock% (%tomorrow%) " - ] + let + greyFg x = "" <> x <> "" + in + " %XMonadLog% " + <> alignSep config + <> intercalate "|" + [ (unwords . map greyFg) + [ "[AUA: %arubaClock%]" + , "[DUB: %dublinClock%]" + , "[CDG: %cetClock%]" + , "[TPE: %tstClock%]" + ] + <> " " + , " %RCSS% " + , " %battery%, %powerprofilesctl%) " + , " %hereClock% (%tomorrow%) " + ] } second :: Int -> Int