xmobar: add more clocks

This commit is contained in:
Primrose 2025-08-11 22:01:04 +02:00
parent 9837a70014
commit 2a321203cb
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -1,7 +1,9 @@
import Xmobar
import Data.Function ((&))
import Data.List (intercalate)
config :: Config
config =
defaultConfig
{ overrideRedirect = False
@ -10,7 +12,10 @@ config =
, fgColor = "#FFFFFF"
, position = BottomH 30
, commands =
[ Run $ Date "%a %d %H:%M:%S" "date" (1 &second)
[ Run $ Date "%a %d %H:%M:%S" "hereClock" (1 &second)
, Run $ DateZone "%H:%M" "" "America/Aruba" "arubaClock" (1 &second)
, Run $ DateZone "%H:%M" "" "Europe/Paris" "cetClock" (1 &second)
, Run $ DateZone "%H:%M" "" "Asia/Taipei" "tstClock" (1 &second)
, Run $
Com
"tomorrow"
@ -38,7 +43,7 @@ config =
, Run $
Weather
"LFRN"
[ "-t", "<station>: <tempC>C"
[ "-t", "<station>: <tempC>°C"
, "-L","10", "-H", "25"
, "--normal", "white"
, "--high", "orange"
@ -48,7 +53,20 @@ config =
]
, sepChar = "%"
, alignSep = "}{"
, template = " %XMonadLog% }{ %LFRN% | %battery%, %powerprofilesctl%) | %date%, j%tomorrow% "
, template =
" %XMonadLog% "
<> alignSep config
<> intercalate "|"
[ unwords
[ "<fc=#c9c9c9>[Aruba: %arubaClock%]</fc>"
, "<fc=#c9c9c9>[CET: %cetClock%]</fc>"
, "<fc=#c9c9c9>[TST: %tstClock%]</fc>"
]
<> " "
, " %LFRN% "
, " %battery%, %powerprofilesctl%) "
, " %hereClock% (j%tomorrow%) "
]
}
second :: Int -> Int