diff options
author | Fabian Kirchner <kirchner@posteo.de> | 2024-08-12 18:51:07 +0200 |
---|---|---|
committer | Fabian Kirchner <kirchner@posteo.de> | 2024-08-12 18:51:07 +0200 |
commit | 289471bd87727a6cee6e8a5c219d7cbadf9a4849 (patch) | |
tree | bc40bc67e3e1a3a4b83eb6f33e5530e4e14f9012 /app/Sensor.hs | |
parent | c8095f71c8f739a15579edb820ece9dbf19daf56 (diff) |
feat: add icon for weather forecast
Diffstat (limited to 'app/Sensor.hs')
-rw-r--r-- | app/Sensor.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/Sensor.hs b/app/Sensor.hs index d65b556..512870b 100644 --- a/app/Sensor.hs +++ b/app/Sensor.hs @@ -360,8 +360,13 @@ getForecast = handle (\(e :: SomeException) -> print e >> throwIO e) do addUserAgent req = addRequestHeader (fromString "user-agent") (fromString "astatusbar") req weatherForecast :: (S.MonadSensor m) => S.Sensor m () (Maybe String) -weatherForecast = - S.sensor WeatherForecast +weatherForecast = do + value <- S.sensor WeatherForecast + return + ( case value of + Just "partlycloudy_night" -> Just "\xe37e" + _ -> value + ) data CurrentTime = CurrentTime deriving (Show) |