From 4a8b739d04a247d042e5bf894331485b1eb1998f Mon Sep 17 00:00:00 2001 From: Jas Singh Date: Sun, 28 Jul 2024 11:44:31 -0700 Subject: [PATCH] Closes #20 - Battery percentage is now appropriately rounded instead of showing decimals. --- modules/bar/battery/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bar/battery/index.ts b/modules/bar/battery/index.ts index 977a2a8..86dbbb3 100644 --- a/modules/bar/battery/index.ts +++ b/modules/bar/battery/index.ts @@ -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) {