From 289471bd87727a6cee6e8a5c219d7cbadf9a4849 Mon Sep 17 00:00:00 2001 From: Fabian Kirchner Date: Mon, 12 Aug 2024 18:51:07 +0200 Subject: feat: add icon for weather forecast --- app/Sensor.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app') 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) -- cgit v1.2.3