Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (14 sloc) 386 Bytes
function wifi(adapter)
spacer = " "
local f = io.open("/sys/class/net/"..adapter.."/wireless/link")
local wifiStrength = f:read()
if wifiStrength == "0" then
wifiStrength = "Network Down"
else
wifiStrength = "Wifi:"..spacer..wifiStrength.."%"
end
text = spacer..wifiStrength..spacer
f:close()
return text
end
return wifi
Jump to Line
Something went wrong with that request. Please try again.