mirror of
https://github.com/don-philipe/knorke.git
synced 2026-05-13 23:31:46 +02:00
Fix wifi tooltip when not connected
This commit is contained in:
@@ -50,7 +50,7 @@ vicious.register(widget.text, vicious.widgets.wifi,
|
|||||||
end
|
end
|
||||||
info = args
|
info = args
|
||||||
else
|
else
|
||||||
widget.icon:set_image(icon_wifi)
|
widget.icon:set_image(icon_none)
|
||||||
end
|
end
|
||||||
return " " .. args["{ssid}"]
|
return " " .. args["{ssid}"]
|
||||||
end, 2, "wlp64s0")
|
end, 2, "wlp64s0")
|
||||||
@@ -65,18 +65,22 @@ function container.set_icons(wifi, excellent, good, ok, none)
|
|||||||
end
|
end
|
||||||
|
|
||||||
awful.tooltip(
|
awful.tooltip(
|
||||||
{
|
{
|
||||||
objects = { widget },
|
objects = { widget },
|
||||||
mode = "outside",
|
mode = "outside",
|
||||||
align = "right",
|
align = "right",
|
||||||
fg = "white",
|
fg = "white",
|
||||||
margin_leftright = 10,
|
margin_leftright = 10,
|
||||||
margin_topbottom = 10,
|
margin_topbottom = 10,
|
||||||
timer_function = function()
|
timer_function = function()
|
||||||
return info["{ssid}"] .. "\n Channel: " .. info["{chan}"] .. "\n Rate: " .. info["{rate}"] .. "Mb/s\n Frequency: " .. info["{freq}"] .. "MHz"
|
if info["{ssid}"] ~= nil then
|
||||||
end,
|
return info["{ssid}"] .. "\n Channel: " .. info["{chan}"] .. "\n Rate: " .. info["{rate}"] .. "Mb/s\n Frequency: " .. info["{freq}"] .. "MHz"
|
||||||
preferred_positions = {"right", "left", "top", "bottom"}
|
else
|
||||||
}
|
return "N/A"
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
preferred_positions = {"right", "left", "top", "bottom"}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
return container
|
return container
|
||||||
|
|||||||
Reference in New Issue
Block a user