Only show 1 digit after decimal point for battry percentage

This commit is contained in:
Cyao 2024-06-04 17:59:58 +02:00 committed by GitHub
parent 9eaf715666
commit 70fac17e32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,7 +99,7 @@ const BarBattery = () => Box({
Label({
className: 'txt-smallie',
setup: (self) => self.hook(Battery, label => {
label.label = `${Battery.percent}%`;
label.label = `${Battery.percent.toFixed(1)}%`;
}),
}),
Overlay({