From a160cc25ba27b17e798f9d0eadd2c9576473ae9a Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 29 Jun 2019 23:16:49 +0100 Subject: New WeatherX variant with sky conditions translations --- readme.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 6834eaf..2214bda 100644 --- a/readme.md +++ b/readme.md @@ -739,6 +739,39 @@ something like: - Default template: `: C, rh % ()` - Retrieves weather information from http://tgftp.nws.noaa.gov. +### `WeatherX StationID SkyConditions Args RefreshRate` + +- Works in the same way as `Weather`, but takes an additional + argument, a list of pairs from sky conditions to their replacement + (typically a unicode string or an icon specification). +- Use the variable `skyConditionS` to display the replacement of the + corresponding sky condition. All other `Weather` template variables + are available as well. + +For example: + +```haskell + WeatherX "LEBL" + [ ("clear", "🌣") + , ("sunny", "🌣") + , ("mostly clear", "🌤") + , ("mostly sunny", "🌤") + , ("partly sunny", "⛅") + , ("fair", "🌑") + , ("cloudy","☁") + , ("overcast","☁") + , ("partly cloudy", "⛅") + , ("mostly cloudy", "🌧") + , ("considerable cloudiness", "⛈")] + ["-t", " ° % ()" + , "-L","10", "-H", "25", "--normal", "black" + , "--high", "lightgoldenrod4", "--low", "darkseagreen4"] + 18000 +``` + +As mentioned, the replacement string can also be an icon +specification, such as `("clear", "")`. + ### `Network Interface Args RefreshRate` - Aliases to the interface name: so `Network "eth0" []` can be used as -- cgit v1.2.3