Closes #20 - Battery percentage is now appropriately rounded instead of showing decimals.

This commit is contained in:
Jas Singh
2024-07-28 11:44:31 -07:00
parent 64e57f9933
commit 4a8b739d04

View File

@@ -49,7 +49,7 @@ const BatteryLabel = () => {
return [
Widget.Icon({ icon: icon() }),
Widget.Label({
label: battery.bind("percent").as((p) => ` ${p}%`),
label: battery.bind("percent").as((p) => ` ${Math.floor(p)}%`),
}),
];
} else if (batAvail && !showLabel) {