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

@@ -16,8 +16,23 @@ export const WaybarBrightnessWidget = () => {
setBrightness(newBrightness);
};
const tooltip =
brightness === 100
? "Full"
: brightness >= 70
? "Almost full"
: brightness >= 50
? "Halfway down, but still doing great. I wonder what happens if the brightness reaches 0"
: brightness >= 25
? "Uh maybe you should consider charging me ?"
: brightness >= 15
? "It's really reaching low level now"
: brightness >= 5
? "Are you ignoring my messages ??"
: "I warned you";
return (
<WaybarWidget className="pl-3 pr-[0.625rem]">
<WaybarWidget className="pl-3 pr-[0.625rem]" tooltip={tooltip}>
<span onWheel={handleScroll}>
{lerpIcon(ICONS, brightness, 100)} {brightness}%
</span>