summaryrefslogtreecommitdiffhomepage
path: root/src/lib/Monitors.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2019-06-29 23:26:53 +0100
committerjao <jao@gnu.org>2019-06-29 23:26:53 +0100
commit7f6b57d43ae52cb8cb5a99eb40c092c1442a9c21 (patch)
treedd0444bd39a4f006d2f365e53273e86bf288b8fe /src/lib/Monitors.hs
parentb0030f6c35a1ab02bc4ff256984c75513981cd8f (diff)
downloadxmobar-config-7f6b57d43ae52cb8cb5a99eb40c092c1442a9c21.tar.gz
xmobar-config-7f6b57d43ae52cb8cb5a99eb40c092c1442a9c21.tar.bz2
New WeatherX
Diffstat (limited to 'src/lib/Monitors.hs')
-rw-r--r--src/lib/Monitors.hs37
1 files changed, 26 insertions, 11 deletions
diff --git a/src/lib/Monitors.hs b/src/lib/Monitors.hs
index 1ad3c89..f3e76f1 100644
--- a/src/lib/Monitors.hs
+++ b/src/lib/Monitors.hs
@@ -61,20 +61,35 @@ uptime p = Uptime (p <~> [ "-t" , "<days> <hours>", "-m", "3", "-c", "0", "-S"
, "On" , "-L", "10", "-H", "100"]) 600
weather st =
- Weather st ["-t", "<tempC>° <rh>% <windKmh> <skyCondition> (<hour>)"
- , "-L","10", "-H", "25", "--normal", "black",
- "--high", "lightgoldenrod4", "--low", "darkseagreen4"] 18000
+ WeatherX st
+ [ ("clear", "🌣")
+ , ("sunny", "🌣")
+ , ("mostly clear", "🌤")
+ , ("mostly sunny", "🌤")
+ , ("partly sunny", "⛅")
+ , ("fair", "🌑")
+ , ("cloudy","☁")
+ , ("overcast","☁")
+ , ("partly cloudy", "⛅")
+ , ("mostly cloudy", "🌧")
+ , ("considerable cloudiness", "⛈")]
+ ["-t", "<fn=2><skyConditionS></fn> <tempC>° <rh>% <windKmh> (<hour>)"
+ , "-L","10", "-H", "25", "--normal", "black"
+ , "--high", "lightgoldenrod4", "--low", "darkseagreen4"]
+ 18000
batt p =
BatteryN ["BAT0"]
- ((p <~> ["-t", "<acstatus> <left>%"
- , "-S", "Off", "-d", "0", "-m", "3"
- , "-L", "10", "-H", "80", "-p", "3"])
- ++ [ "--"
- , "-i", "<fn=2>🔌</fn>", "-O", " <fn=2>🔌</fn> <timeleft> <watts>"
- , "-o", " <fn=2>🔋</fn> <timeleft> <watts>"
- , "-H", "16", "-L", "10"
- , "-h", "sienna4", "-l", "gray20"]) 50 "batt0"
+ ["-t", "<acstatus> <left>%"
+ , "-S", "Off", "-d", "0", "-m", "3"
+ , "-L", "10", "-H", "90", "-p", "3"
+ , "--low", (pHigh p), "--normal", (pNormal p), "--high", (pLow p)
+ , "--"
+ , "-i", "<fn=2>🔌</fn>"
+ , "-O", " <fn=2>🔌</fn> <timeleft> <watts>"
+ , "-o", " <fn=2>🔋</fn> <timeleft> <watts>"
+ , "-H", "16", "-L", "10"
+ , "-h", "sienna4", "-l", "gray20"] 50 "batt0"
coreTemp p =
CoreTemp (p <~> ["-t", "<core1>° <core2>°"