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/89bb71e154283db9edd656518073200821374100?hp=a250f4d3fcf483cdd7eb10254690a9a8feb4501a #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