xcb_event_get_{request,error}_label() return NULL for non-core requests and
error codes. Obviously, that's not really helpful at all, so also print the
numeric information about what failed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
For example, the rightmost pixel of a border-less graph wasn't draw and all
drawing was shifted one pixel to the left.
Signed-off-by: Uli Schlachter <psychon@znc.in>
behavior before: draw fg color everywhere and draw each value inverted as bg color.
if not enough values available "remove" the free area (draw a big rectangle with bg color over it).
behavior now: draw each value onto background as fg stroke.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In Lua 5.1 lua_open directly calls luaL_newstate, but was deprecated.
In Lua 5.2 lua_open was removed.
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Lua 5.2 removed lua_[gs]etfenv and introduced
lua_[gs]etuservalue. Not sure though if it provides
the required functionality which awesome is using.
Thus, need some testing.
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
The original struct name is luaL_Reg, but Lua v5.1 had a
`typedef luaL_reg luaL_Reg`, which in v5.2 was removed
and as a result breaking the build in Awesome which uses luaL_reg
version exclusively.
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Add a function keygrabber.isrunning() which return a boolean state of
keygrabber
Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Julien Danjou <julien@danjou.info>
Add a function mousegrabber.isrunning() which return a boolean state of
mousegrabber
Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Julien Danjou <julien@danjou.info>
When something sends notifications which don't get mapped into some preset,
args.preset would be nil and indexing nil throws a lua error. Fix this by using
the default preset in that case.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The cairo bindings are quite new in lgi and thus we depend on a quite new
version of lgi. Older versions will fail with lots of weird errors, e.g.:
lib/gears/color.lua:61:attempt to call field 'create_rgba' (a nil value)
Signed-off-by: Uli Schlachter <psychon@znc.in>
Commit d14d6959ea caused every notify() call to fail with 'attempt to
compare number with nil' because the default_preset table no longer exists.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Many themes have prerendered icons of different sizes stored in
subdirectories named as '<size>x<size>'. By looking in these directories
when a specific icon size is specified, we can support themes in a
rather straightforward way.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Build the preset values by merging the default preset with the one
actually specified, falling back to the normal preset if no preset is
specified.
This allows changing the position/font/whatever of all notification by
only setting up the default preset value (modulo overrides in the other
presets), instead of having to manually set it in all presets.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Now that the C code uses lightuserdata for passing around cairo surfaces, they
are no longer automatically garbage collected. To avoid memleaks, this commit
compares the C code to use cairo_surface_t pointers instead of the lua stack.
This also fixes a memleak were a client's icon was leaked.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of creating unused cairo image surfaces, we create our temporary layouts
now via the (PangoCairo) font map. Way less ugly.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Simply adds a define required for awesomewm to work on the BSDs.
Signed-off-by: Edward O'Callaghan <eocallaghan@auroraux.org>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Thanks to muni who managed to crash his WM with conky. When conky runs in its
own window, clicking on it will sometimes (depending on the conkyrc) use
XSendEvent() to forward the event to the WM.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds the documentation about keybindings for luadoc.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
For example, I have some lua code which sets the border width based on the
number of visible clients. When just a single client is visible, the border
width is 0, else it's what the theme says.
Previously, this caused visible "glitches" for fullscreen'd and maximized
clients. This patch fixes that and updates the client's geometry and
border width appropriately.
This has a slight chance of going into an endless loop if someone sets a
fullscreen'd clients border width from its property::border_width signal.
Just don't do that!
Thanks to Arvydas Sidorenko for finding this issue.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Patterns like
if condition then
return true
else
return false
end
could be simplified to
return condition
Signed-off-by: Felix <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds more navigation keybindings ('Home' and 'End'), which select
the first and the last entry from the list respectively. Also, it adds
two more keybindings:
'Ctrl+Enter' - Run the query (no need to press End and then
Enter)
'Ctrl+Alt+Enter' - Run query in the terminal (sometimes there are
terminal applications which one wants to run, e.g. ncmpcpp)
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
After some recent keygrabber changes the menubar's application
execution was broken. This commit fixes it.
Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Since we can search for commands in menubar and easily execute almost
any program now, we can definitely make use of awful.shell.completion,
which is enabled with this commit.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds a 'Exec: <your-cmd-here>' item to the end of the list,
which appears only if there is at least one application entry in
the list. This is useful, when the program is not in the list of menubar
entries (e.g. it does not have a .desktop file).
When there is are no matching application entries, the 'Exec: ' item is
silently removed, as we already have the same in the prompt.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>