Skip to content

Commit 34a388c

Browse files
committed
Fix battery string formatting
1 parent d6733cf commit 34a388c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

battery-widget/battery.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ local function worker(user_args)
163163
charge = charge / capacity
164164

165165
if show_current_level then
166-
level_widget.text = string.format('%d%%', charge)
166+
level_widget.text = string.format('%.0f%%', charge)
167167
end
168168

169169
if (charge >= 1 and charge < 15) then

0 commit comments

Comments
 (0)