Hello list, I was wondering if people here could help me some stuff.
I want to make a widget, which would have a menu appearing when clicking on the widget itself in the wibox. What would be the proper way of doing it, because if I try to execute the following inside the module, it errors out, by saying something about beautiful. ---- Code begin ---- menu = awful.menu({items = { -- The actual menu looks differently, but that is not that really -- important, as the menu I want to run runs from awesome rc.lua. I -- just want to place it in an external module { "item 1", function() foo() end, img(bar.png) }, { "item 2", function() foo() end, img(bar.png) }, { "item 3", function() foo() end, img(bar.png) } }}) -- Bindings for the widget widget:buttons(awful.util.table.join( awful.button({}, 1, function () menu:toggle({keygrabber=true}) end) )) ---- Code end ------ So this code doesn't work, if I put it inside a file on ~/.config/awesome/mywidget/init.lua and then import it to rc.lua via require("mywidget") and I would like it to work. Are there any thoughts? Tell me if I need to be more specific, or you want to see the actual code of the widget. Thanks, Ignas -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.