diff options
author | jao <jao@gnu.org> | 2024-08-20 15:09:59 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2024-08-20 15:09:59 +0100 |
commit | 974409e73556984ceeb1c5cb2e9a1b4bf944dc7a (patch) | |
tree | 85b7810e1b1c1fa7b706aa97f8efcd1ce12f9b84 | |
parent | 666de44018f4e9dc4ed089ba35fbb00a50a1454f (diff) | |
download | xmobar-config-master.tar.gz xmobar-config-master.tar.bz2 |
-rw-r--r-- | lib/Config.hs | 3 | ||||
-rw-r--r-- | lib/Monitors.hs | 64 | ||||
-rw-r--r-- | src/Single.hs | 5 |
3 files changed, 47 insertions, 25 deletions
diff --git a/lib/Config.hs b/lib/Config.hs index a388e1e..845aa8a 100644 --- a/lib/Config.hs +++ b/lib/Config.hs @@ -85,7 +85,8 @@ baseConfig p = defaultConfig { , borderColor = pBorder p , fgColor = pForeground p , bgColor = pBackground p - , additionalFonts = ["FontAwesome 9"] + , additionalFonts = ["FontAwesome 9", "Weather Icons 10"] + , textOffsets = [0, -2] , border = NoBorder , alpha = pAlpha p , overrideRedirect = True diff --git a/lib/Monitors.hs b/lib/Monitors.hs index 0b65af0..1444305 100644 --- a/lib/Monitors.hs +++ b/lib/Monitors.hs @@ -50,34 +50,55 @@ cpuFreq p = CpuFreq (p <~> ["-t" , "<avg> <max> <min> <cpu0> <cpu1> <cpu2> <cpu3 uptime p = Uptime (p <~> [ "-t" , "<days> <hours>", "-m", "3", "-c", "0", "-S" , "On" , "-L", "10", "-H", "100"]) 600 +-- https://erikflowers.github.io/weather-icons/ weather' tmp st p = WeatherX st - [ ("", "\129695") - , ("clear", "🔆") - , ("sunny", "🔆") - , ("fair", "🔆") - , ("mostly clear", "🌤️") - , ("mostly sunny", "🌤️") - , ("partly sunny", "⛅") - , ("obscured", "🌁") - , ("fog", "🌫️") - , ("foggy", "🌫️") - , ("cloudy", "☁️") - , ("overcast", "☁️") - , ("partly cloudy", "⛅") - , ("mostly cloudy", "☁️") - , ("considerable cloudiness", "🌂") - , ("light rain", "🌦️") - , ("rain", "🌨️") - , ("ice crystals", "❄️") - , ("light snow", "🌨️") - , ("snow", "❄️") + [ -- ("", "\129695") + -- , ("clear", "🔆") + -- , ("sunny", "🔆") + -- , ("fair", "🔆") + -- , ("mostly clear", "🌤️") + -- , ("mostly sunny", "🌤️") + -- , ("partly sunny", "⛅") + -- , ("obscured", "🌁") + -- , ("fog", "🌫️") + -- , ("foggy", "🌫️") + -- , ("cloudy", "☁️") + -- , ("overcast", "☁️") + -- , ("partly cloudy", "⛅") + -- , ("mostly cloudy", "☁️") + -- , ("considerable cloudiness", "🌂") + -- , ("light rain", "🌦️") + -- , ("rain", "🌨️") + -- , ("ice crystals", "❄️") + -- , ("light snow", "🌨️") + -- , ("snow", "❄️") + ("", "\xf054") + , ("clear", "\xf00d") + , ("sunny", "\xf00d") + , ("fair", "\xf00d") + , ("mostly clear", "\xf00c") + , ("mostly sunny", "\xf00c") + , ("partly sunny", "\xf00c") + , ("obscured", "\xf063") + , ("fog", "\xf014") + , ("foggy", "\xf014") + , ("cloudy", "\xf041") + , ("overcast", "\xf041") + , ("partly cloudy", "\xf083") + , ("mostly cloudy", "\xf013") + , ("considerable cloudiness", "\xf002") + , ("light rain", "\xf01c") + , ("rain", "\xf019") + , ("ice crystals", "\xf077") + , ("light snow", "\xf01b") + , ("snow", "\xf01b") ] (mkArgs p ["-t", tmp , "-L", "10", "-H", "25" , "-T", "20"] ["-w", ""]) 18000 -weather = weather' "<skyConditionS> <tempC>° <windKmh> <weather>" +weather = weather' "<fn=2><skyConditionS></fn> <tempC>° <windKmh> <weather>" -- "https://wttr.in?format=" ++ fnn 3 "%c" ++ "+%t+%C+%w++" ++ fnn 1 "%m" -- , Run (ComX "curl" [wttrURL "Edinburgh"] "" "wttr" 18000) @@ -198,6 +219,7 @@ masterAlsa p = captureAlsa = Alsa "default" "Capture" ["-t", "<volume>"] +-- kbd p = Kbd [("us", "us"), ("us(intl)", "es")] -- kbi pDim kbd p = Kbd [("us", ""), ("us(intl)", kbi pHigh)] -- kbi pDim where kbi a = fc (a p) (fn 1 " \xf11c") diff --git a/src/Single.hs b/src/Single.hs index 2119c6d..ca21243 100644 --- a/src/Single.hs +++ b/src/Single.hs @@ -27,13 +27,12 @@ config p = (baseConfig p) { , bgColor = if pIsLight p then "#f0f0f0" else "black" , alpha = 233 , border = FullB - , textOffsets = [] , textOffset = 0 , iconOffset = 0 , dpi = 0 -- , font = "Source Code Pro, Noto Color Emoji Regular 9, Regular 9" - , font = "DejaVu Sans Mono, Noto Color Emoji 9, Regular 9" - -- , font = "Hack, Noto Color Emoji Regular 9, Light 9" + -- , font = "DejaVu Sans Mono, Noto Color Emoji 9, Regular 9" + , font = "Hack, Noto Color Emoji Regular 9, Light 9" , commands = [ Run (topProcL p isXmonad) , Run (load p) , Run (iconBatt p) |