From: Luke Bonham Date: Tue, 19 May 2015 11:21:15 +0000 (+0200) Subject: Merge pull request #107 from OlegHahm/floor_smapi X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/a148f0674c40f208c17d44755b10445e17a32be6?hp=161abc46abf98a9a28ee4ee4f4b8c10ac57eabbc Merge pull request #107 from OlegHahm/floor_smapi smapi: round remaining hour estimation --- diff --git a/widgets/contrib/tpbat/smapi.lua b/widgets/contrib/tpbat/smapi.lua index 862d4cd..c7f093e 100644 --- a/widgets/contrib/tpbat/smapi.lua +++ b/widgets/contrib/tpbat/smapi.lua @@ -87,7 +87,7 @@ function smapi:battery(name) return "N/A" end - local hrs = mins_left / 60 + local hrs = math.floor(mins_left / 60) local min = mins_left % 60 return string.format("%02d:%02d", hrs, min) end