X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/be725b3ecff60f77dc800f38cab340df494b82eb..7e6f1336f26e8c36a1768ae1f7f076a30030a8a8:/widgets/net.lua diff --git a/widgets/net.lua b/widgets/net.lua index ee2cfa7..4dbacf5 100644 --- a/widgets/net.lua +++ b/widgets/net.lua @@ -24,7 +24,7 @@ local function worker(args) local net = { last_t = 0, last_r = 0, devices = {} } function net.get_first_device() - local ws = helpers.read_pipe("ip link show | cut -d' ' -f2,9") + local ws = helpers.read_pipe("/usr/sbin/ip link show | cut -d' ' -f2,9") ws = ws:match("%w+: UP") or ws:match("ppp%w+: UNKNOWN") if ws then return { ws:match("(%w+):") } else return {} end @@ -128,12 +128,12 @@ local function worker(args) net_now.sent = string.gsub(string.format('%.1f', net_now.sent), ',', '.') net_now.received = string.gsub(string.format('%.1f', net_now.received), ',', '.') - widget = net.widget - settings() - net.last_t = total_t net.last_r = total_r end + + widget = net.widget + settings() end helpers.newtimer(iface, timeout, update)