X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/02a50839c84bed8920dd4c50971a82b3f4034658..bfa2615942951cb2f9de04aba4742efef3ba7423:/widgets/net.lua?ds=sidebyside 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