Added a very simple example to show the usage, and applicability of
awful.menu by dynamically constructing a menu of clients that match a
particular rule.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Display the possible keys to the 'menu' params as a bullet list
(unreadable otherwise).
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
image:type() was removed from oocairo, because the ._NAME property already
exists and there's no need for two functions doing the same job.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Some time ago I added a --no-argb option with the short-hand version -a.
However, the short version didn't actually work. Whoops!
Signed-off-by: Uli Schlachter <psychon@znc.in>
Before this commit, c:tags(tags) and t:clients(clients) first removed all
tags/clients and then added the new one.
This is now changed into only removing the tags/clients that have to be removed
and leaving the others in place. Hopefully, this avoids all kinds of weird
issues which we had.
Signed-off-by: Uli Schlachter <psychon@znc.in>
To demonstrate keygrabber API usage, I added a small function to the
docs that can be bound to a key and used to resize clients using
keyboard.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
naughty now tries to ignore all pango markup by using :set_text() instead of
:set_markup(). If this fails, too, we must have been fed invalid utf8 which we
cannot do anything about.
Signed-off-by: Uli Schlachter <psychon@znc.in>
I removed textbox' check() function, but forgot to see if anything actually
calls it. Just removing the call fixes all problems here.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In commit 3dbf89c I removed a client_unban() in the code path for focusing
clients. The idea was that client focusing is now done after rebanning, so that
it should already be visible by the time this code is executed.
However, minimized clients obviously don't get unbanned, So we have to call
client_unban() here to make sure the client is unminimized.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes the textbox pass the markup/text it is given to oopango immediately.
If it is invalid, a lua error will be thrown and the old text will still be
shown.
This fixes a bug where the whole wibox isn't redrawn when a textbox complains
about broken UTF8.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The luadoc API documentation already contained this function and it seems to be
useful for user configs.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The lua code could keep a reference to out cairo surface for a drawin after it
was destroyed. So make sure the surface is finished before the associated
drawable is destroyed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This reverts commit 7c86714dca.
It doesn't make sense to hard-wire /usr/local into the build, as this
depends entirely on the build target.
Signed-off-by: Uli Schlachter <psychon@znc.in>
We actually have to set a proper background color on all our drawins, else the
default black will "flicker through" while the window is drawn.
Signed-off-by: Uli Schlachter <psychon@znc.in>
setwfact() calls idx() on the client that it works on. When idx() is called with
a client that isn't visible, it fails while trying to find outs the client's
index in the current layout.
event_handle_mousegrabber:119: error running function:
lib/awful/client.lua:688: attempt to compare nil with number
Fix this by ignoring all clients that aren't visible in setwfact().
Signed-off-by: Uli Schlachter <psychon@znc.in>
This function can be called from unprotected contexts. Calling luaL_error() in
this case results in a call to luaA_panic() and awesome dies.
The only real change here is that this now calls warn() instead of luaL_error().
The rest is reindentation because warn() returns while luaL_error() didn't.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, if you called luaA_object_decref() it would silently *create* a new
reference with reference count -1. Obviously, this is not good.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Each process spawned from awesome now gets its own session and process group.
This makes sure they aren't connected to awesome in any way any more. This
especially fixes some problems with signals.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When the X connection breaks for whatever reason, awesome wouldn't properly
exit, but go into a busy loop instead. Fix this by dying when our connection to
the X server dies.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If you managed to press mouse button 4 exactly between two entries in the
taglist, the taglist would jump by two tags instead of just one. This is because
the mouse event was forwarded to both taglist items.
This happened because the calculation in wibox' find_widgets() was wrong. If you
have a widget at (1, 1) with a size of 1x1, then (1, 1) is the only point that
this widget covers. However, the math also included the pixels (2, 1), (1, 2)
and (2, 2) in the widget's extents. This is obviously wrong.
Signed-off-by: Uli Schlachter <psychon@znc.in>
So far this only contains an "assert()" function, but I guess this could be
enhance. For example, a function which pretty-prints a table's contents might be
useful to have.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Seems like there are enough bugs in the X server that one can't really use a 32
bit visual. Looks of repaint errors. :(
This should somehow be fixed properly before release. For now, this just swaps
the default behavior and the "--no-argb" behavior.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Added function to show only minimized clients in the taskbar for the
current tag.
Signed-off-by: Danny Navarro <j@dannynavarro.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Everyone uses "normal" alpha. Cairo uses pre-multiplied alpha. That means that
0x80800000 is translucent red and 0x80ff0000 is just invalid. We were using the
invalid version previously.
This fixes all kinds of tray icons whose background was previously wrong.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, we used a timer with a timeout of 0 for redrawing the wibox. I had
the visual impression that the wibox was black for a moment. With strace I was
able to measure a latency of 10ms until the wibox was finally redrawn.
This now uses the "refresh" signal. With this, we get our latency down to
something like 0.15ms which sounds a lot better. :)
Signed-off-by: Uli Schlachter <psychon@znc.in>