Fix wifi tooltip when not connected

This commit is contained in:
don philipe
2026-04-13 00:29:18 +02:00
parent 04541118c8
commit 5ee82345ed
+5 -1
View File
@@ -50,7 +50,7 @@ vicious.register(widget.text, vicious.widgets.wifi,
end
info = args
else
widget.icon:set_image(icon_wifi)
widget.icon:set_image(icon_none)
end
return " " .. args["{ssid}"]
end, 2, "wlp64s0")
@@ -73,7 +73,11 @@ awful.tooltip(
margin_leftright = 10,
margin_topbottom = 10,
timer_function = function()
if info["{ssid}"] ~= nil then
return info["{ssid}"] .. "\n Channel: " .. info["{chan}"] .. "\n Rate: " .. info["{rate}"] .. "Mb/s\n Frequency: " .. info["{freq}"] .. "MHz"
else
return "N/A"
end
end,
preferred_positions = {"right", "left", "top", "bottom"}
}