diff --git a/modules/icons/index.js b/modules/icons/index.js index ac4d864..06339d6 100644 --- a/modules/icons/index.js +++ b/modules/icons/index.js @@ -146,6 +146,7 @@ export default { sunny: "weather-clear-symbolic", clear: "weather-clear-night-symbolic", partly_cloudy: "weather-few-clouds-symbolic", + partly_cloudy_night: "weather-few-clouds-night-symbolic", cloudy: "weather-overcast-symbolic", overcast: "weather-overcast-symbolic", mist: "weather-overcast-symbolic", diff --git a/modules/menus/calendar/weather/index.js b/modules/menus/calendar/weather/index.js index 2f3d986..bb85bc1 100644 --- a/modules/menus/calendar/weather/index.js +++ b/modules/menus/calendar/weather/index.js @@ -98,12 +98,15 @@ const WeatherWidget = () => { Widget.Icon({ class_name: "calendar-menu-weather today icon", icon: theWeather.bind("value").as((v) => { - return icons.weather[ - v.current.condition.text + let iconQuery = v.current.condition.text .trim() .toLowerCase() .replaceAll(" ", "_") - ]; + + if (!v.current.isDay && iconQuery === "partly_cloudy") { + iconQuery = "partly_cloudy_night"; + } + return icons.weather[iconQuery]; }), }), ], @@ -275,12 +278,16 @@ const WeatherWidget = () => { (h) => h.time_epoch === nextEpoch, ); - return icons.weather[ - weatherAtEpoch?.condition.text + let iconQuery = weatherAtEpoch?.condition.text .trim() .toLowerCase() .replaceAll(" ", "_") - ]; + + if (!weatherAtEpoch?.isDay && iconQuery === "partly_cloudy") { + iconQuery = "partly_cloudy_night"; + } + + return icons.weather[iconQuery]; }), }), Widget.Label({ diff --git a/modules/menus/media/media.js b/modules/menus/media/media.js index 7ddf533..34622ab 100644 --- a/modules/menus/media/media.js +++ b/modules/menus/media/media.js @@ -34,7 +34,11 @@ const Media = () => { )[0]; } - if (media.players.length && curPlayer && curPlayer.play_back_status !== "Stopped") { + if ( + media.players.length && + curPlayer && + curPlayer.play_back_status !== "Stopped" + ) { return (self.children = [ AlbumCover(curPlayer), Widget.Box({