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

@@ -23,6 +23,13 @@ export const PowerButton = (action: PowerOptions) => {
}
};
const powerIconMap = {
shutdown: "󰐥",
reboot: "󰜉",
logout: "󰿅",
sleep: "󰤄",
};
return Widget.Button({
className: showLabel.bind("value").as(shwLbl => {
return `power-menu-button ${action} ${!shwLbl ? "no-label" : ""}`;
@@ -33,9 +40,9 @@ export const PowerButton = (action: PowerOptions) => {
children: showLabel.bind("value").as(shwLbl => {
if (shwLbl) {
return [
Widget.Icon({
icon: icons.powermenu[action],
className: `power-button-icon ${action}-icon`,
Widget.Label({
label: powerIconMap[action],
className: `power-button-icon ${action}-icon txt-icon`,
}),
Widget.Label({
hpack: "center",
@@ -46,9 +53,9 @@ export const PowerButton = (action: PowerOptions) => {
];
}
return [
Widget.Icon({
icon: icons.powermenu[action],
className: `power-button-icon ${action}-icon no-label`,
Widget.Label({
label: powerIconMap[action],
className: `power-button-icon ${action}-icon no-label txt-icon`,
}),
];
}),