X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/f63a7fd098e3826e397c16938968a1a840150abe..de03791b816b60acbfcb41476330142135ac4ac3:/widgets/net.lua diff --git a/widgets/net.lua b/widgets/net.lua index a4b1097..da2130f 100644 --- a/widgets/net.lua +++ b/widgets/net.lua @@ -56,7 +56,7 @@ local function worker(args) local now_t = helpers.first_line(string.format('/sys/class/net/%s/statistics/tx_bytes', iface)) or 0 local now_r = helpers.first_line(string.format('/sys/class/net/%s/statistics/rx_bytes', iface)) or 0 - if now_t ~= net.last_t or now_r ~= net.last_r then + if now_t ~= net.last_t or now_r ~= net.last_r then net_now.sent = (now_t - net.last_t) / timeout / units net_now.sent = string.gsub(string.format('%.1f', net_now.sent), ',', '.') net_now.received = (now_r - net.last_r) / timeout / units