This way their name doesn't get mangle by the broken magic. It will also
eventually allow to `error()` in the template when the implicit
`@function` is used.
This commit also fixes a large number of issues found while
proof-reading everything.
Running test-menubar.lua just failed for me locally. The reason was that
the textbox was indexing a nil value when doing 's.dpi'.
This commit fixes the menubar so that its optional screen arguments are
really handled correctly. In fact, a default screen is now chosen way
earlier than before, so that no nil values are used as screens later on.
In other news: I guess test-menubar.lua is not run on any of our Travis
targets...
Signed-off-by: Uli Schlachter <psychon@znc.in>
This changes a line of code that was added in the previous commit.
Previously, when menubar.cache_entries was set to false,
menubar.refresh() was called twice.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The function seems useless and its documentation is wrong. It does not
return a wibox, but a widget. Also, the widget cannot really be used on
its own since it depends on the size of the wibox.
So menubar.get() and its wrapper through the metatable __call should
just be removed. Until then, the needed initialisation code is moved
around a bit and the function is deprecated.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When menubar.refresh() is called, it tries to update the menubar widget.
The call chain looks like this: menulist_update -> common.list_update ->
get_current_page. get_current_page then tries to query information about
the size of the menubar.
Since there is not much point in this, just skip the whole callback in
this case.
Side note: What is the point of menubar.get()? It seems quite useless to
me.
Signed-off-by: Uli Schlachter <psychon@znc.in>
It does not provide much value. The version number is already known to
ldoc globally in the "description" variable.
Signed-off-by: Uli Schlachter <psychon@znc.in>
* This commit add a new module to avoid a (4 level) loop dependency
* It is now possible to call awful.spawn() with a table of properties
* awful.rules is used to execute the rules.
* Everything is public to allow alternative workflow modules such as
Tyrannical to use their own callback implementation.