From: luke bonham Date: Mon, 20 Oct 2014 13:56:44 +0000 (+0200) Subject: #68 solution attempt X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/1a654b327dba5afceef90595d3fc79b5ad67f7d5?ds=inline #68 solution attempt --- diff --git a/widgets/net.lua b/widgets/net.lua index ed6a2ef..84751b6 100644 --- a/widgets/net.lua +++ b/widgets/net.lua @@ -31,9 +31,9 @@ function net.get_device() f = io.popen("ip link show | cut -d' ' -f2,9") ws = f:read("*a") f:close() - ws = ws:match("%w+: UP") + ws = ws:match("%w+: UP") or ws:match("ppp%w+: UNKNOWN") if ws ~= nil then - return ws:gsub(": UP", "") + return ws:match("(%w+):") else return "network off" end