Hi,
The problem is similar to what another awesome user had a few months
back. http://comments.gmane.org/gmane.comp.window-managers.awesome/8627 .
Now, following the thread there, I decided to do the same. My code for
network up/down widget looked something like this:-
-- START OF CODE
-- Initialize widget (this is what I add later in wibox array)
netwidget_box = widget({ type = "textbox" })
-- Register widget
vicious.register(netwidget_box, vicious.widgets.net,
function (widget, args)
for _,device in pairs(networks) do
if tonumber(args["{".. device .." carrier}"]) > 0 then
dnicon.image = image(awful.util.getdir("config") ..
"/icons/down.png")
upicon.image = image(awful.util.getdir("config") ..
"/icons/up.png")
return print_net(device, args["{"..device .."
down_kb}"], args["{"..device.." up_kb}"])
end
end
end, 1)
-- The next line throws error
netwidget = wibox.widget.base.make_widget(netwidget_box)
netwidget.fit = function(_, w, h)
return 100, h
end
-- END OF CODE
Now, when I restarted awesome with this code, I am getting this error.
"Attempt to index field 'widget' a nill value". So guys, what wrong is
happening here?
Regards,
Abhijeet
--
To unsubscribe, send mail to [email protected].