Updated weather and power button icons to use text-icons rather than system icons. (#232)

* Replace weather and power icons with nerdfont icons.

* Update power icons for power dropdown menu.
This commit is contained in:
Jas Singh
2024-09-07 13:24:30 -07:00
committed by GitHub
parent 5373c106d2
commit bd573ec4e7
10 changed files with 145 additions and 61 deletions

View File

@@ -4,6 +4,7 @@ import { DEFAULT_WEATHER } from "lib/types/defaults/weather.js";
import GLib from "gi://GLib?version=2.0"
import icons from "../modules/icons/index.js";
import { weatherIcons } from "modules/icons/weather.js";
const { key, interval, location } = options.menus.clock.weather;
@@ -98,8 +99,7 @@ export const getWindConditions = (wthr: Weather, unt: UnitType) => {
export const getRainChance = (wthr: Weather) => `${wthr.forecast.forecastday[0].day.daily_chance_of_rain}%`;
export const getWeatherStatusIcon = (wthr: Weather) => {
export const getWeatherStatusTextIcon = (wthr: Weather) => {
let iconQuery = wthr.current.condition.text
.trim()
.toLowerCase()
@@ -108,6 +108,7 @@ export const getWeatherStatusIcon = (wthr: Weather) => {
if (!wthr.current.is_day && iconQuery === "partly_cloudy") {
iconQuery = "partly_cloudy_night";
}
return icons.weather[iconQuery];
return weatherIcons[iconQuery];
};
globalThis["globalWeatherVar"] = globalWeatherVar;