summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Config.hs3
-rw-r--r--lib/Monitors.hs64
2 files changed, 45 insertions, 22 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")