feat(waybar): tooltips

This commit is contained in:
2024-08-15 17:52:01 +02:00
parent 515db924d0
commit 5dacaffa16
13 changed files with 172 additions and 35 deletions

View File

@@ -19,8 +19,26 @@ export const WaybarBatteryWidget = (props: { frequency: number }) => {
return () => clearInterval(interval);
});
const tooltip =
battery === 100
? "Full"
: battery >= 70
? "Almost full"
: battery >= 50
? "Halfway down, but still doing great. I wonder what happens if the battery reaches 0"
: battery >= 25
? "Uh maybe you should consider charging me ?"
: battery >= 15
? "It's really reaching low level now"
: battery >= 5
? "Are you ignoring my messages ??"
: "I warned you";
return (
<WaybarWidget className="pl-[0.625rem] pr-3 text-[#1d7715]">
<WaybarWidget
className="pl-[0.625rem] pr-3 text-[#1d7715]"
tooltip={tooltip}
>
{lerpIcon(ICONS, battery, 100)} {battery}%
</WaybarWidget>
);