Permalink
Browse files

battery/openbsd: small fix for remaining time display

Signed-off-by: Gregor Best <gbe@ring0.de>
  • Loading branch information...
1 parent 97f51cd commit 319506358d4285dd4ae40851e9a7397e8f3c54ba @farhaven farhaven committed Oct 7, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 battery/init.lua
View
2 battery/init.lua
@@ -129,7 +129,7 @@ local backends = {
if rv.time == "unknown" then
rv.time = nil
else
- rv.time = tostring(math.floor((rv.time / 60) + 0.5)) .. ":" .. tostring(rv.time % 60)
+ rv.time = tostring(math.floor((rv.time / 60) + 0.5)) .. ":".. ((rv.time % 60 < 10) and "0" or "") .. tostring(rv.time % 60)
end
if tonumber(rv.charge) >= 98 and rv.state == "charging" then

0 comments on commit 3195063

Please sign in to comment.