X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/b963bb6bde2b708e6f01b8a9d469d960501a2e0a..af30c92b12e46a3b9deb94859950c90c63d1c7b1:/widgets/contrib/tpbat/smapi.lua

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