add awful.client.cycle to iterate through clients that match a given condition
A common use case is to cycle through clients that match a given rule and take
certain action on them: raise, set or get property, etc.; see usage example in
the docs.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.util.table.cycle iterates through elements of the table that match the
given condition.
This will help writing concise code when one wants to apply a function to
(read, take some action) on a select list of elements in a table (of say,
clients and tags).
Conflicts:
lib/awful/util.lua.in
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Most probably, the original author chose to use 'K' first, switched to
'myclock' later, and forgot to update remaining occurrences of 'K'.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
There was a few days ago a bug report about missing icons with provided
link to the original ones. My previous patch was with icons made
by me using the ones from default theme, just changed the color.
Probably you should ignore it and use this one unless you like
my made more.
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Starting with glib2 2.31.0, It is no longer possible to
include individual headers (like "ghash.h") -- you must
#include <glib.h>.
Signed-off-by: Thomas Moschny <thomas.moschny@gmx.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Initializing the client property "floating_geometry" on the
property::geometry signal is problematic since this is emitted before
client_set_border_width(), causing the internal client geometry to get
stored and later passed to client:geometry() which assumes it includes
titlebar and borders.
Signed-off-by: Corey Thompson <cmtptr@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Biggest plus is that this no longer errors out when wallpaper_cmd isn't a table.
Second biggest plus is that this now prints a warning.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When I cherry-picked commit 2785d695ce from master, I didn't notice that it uses
connect_signal() which is add_signal() in 3.4-land. That was half a month ago.
Since then, no one complaint about this, so no one hit the problem yet?
Ok, it is in the default config which I guess isn't what the people who use
git/3.4 run. Still, would have been nice to know that people actually test the
mess which I produce. :-(
Signed-off-by: Uli Schlachter <psychon@znc.in>
wallpaper.is_valid(tw):
Checks that the table has only string entries.
Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
If the first argument to cycle must be > 1 or else return nil
immediately.
Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Whenever awesome's C code calls into lua via a protected call, the debug::error
signal is emitted on errors. We now use this to give naughty popups for every
single error that happens. This should help people to notice errors easier.
The only exception are mouse and key grabbers and config loading, those don't go
through debug::error. I guess that means that the grabbers need to be hooked up
to debug::error. :-)
Signed-off-by: Uli Schlachter <psychon@znc.in>
If loading of any config file fails, awesome will now remember the error message
and make it available to lua. The default config is modified to open a naughty
popup on errors.
This should help all those people who modify their config and then wonder why
there change is ignored, not noticing awesome's error message on stderr
Signed-off-by: Uli Schlachter <psychon@znc.in>
This moves the loading of the rc.lua and managing of pre-existing clients to
after we ungrab the server during startup. To make sure we have no races with
clients which start up parallel to awesome, we do the QueryTree for all the
clients that we have to manage before the ungrab, but start managing the clients
only after the ungrab.
This means that we have already selected our event mask on the root window in
scan() and thus received an UnmapNotify event when we reparent windows into a
frame window. This has the effect that we immediately unmanage the client again,
whoops.
To fix this, we grab the server again and remove our event mask on the root
window again while we reparent.
This should hopefully fix all cases where we deadlock during startup because
pulseaudio wants to talk to the X server, but is being ignored because we have
the server grabbed while at the same time we are waiting for pulseaudio.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
Make the taglist widget skip unstickied and focused desktop clients
for status update by:
* Ignoring focused client if it is of desktop type
* Returning a list of clients from tag.clients without clients
of desktop type.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Boy was this code broken. It tried to stack windows ontop of each other which
were on different screens. However, since they didn't have the same parent, they
obviously couldn't be ontop of each other. The X server just reacted with a "wtf
are you doing?"-kind of error which means the restacking was ignored.
The fix is to restack each screen on its own, completely ignoring any windows
from other screens.
A big thanks goes to Siarhei Siamashka who bisected this issue and helped me
debugging it which took quite a while. Finally, he noticed that my first patch
was broken and also figured out the fix. Thanks!
v2: Move the check on "client_need_stack_refresh" from
client_stack_refresh_screen() into client_stack_refresh(), so that all screens
are restacked instead of just the first one.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This handles corner case where a client has no tags (e.g. stickied), but
is moved across screens.
Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
xcb-util is now split into several repositories since 0.3.8. This
release also cleaned up the API a lot, thus update the code
accordingly.
Signed-off-by: Arnaud Fontaine <arnau@debian.org>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Only do a tag.viewonly() if the urgent client is not visible.
Further, if the boolean 'merge' parameter is true [default false], then
to a tag.viewmore() with all the currently visible tags.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Minimized clients can't have the input focus, so this key binding can't be used
for unminimizing them. Hopefully this clarifies the reason why.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In the bundled rc.lua, mouse button 1 on a tasklist entry was configured to
bring the corresponding client to focus. Modify it to minimize the client if
already focussed.
Such (default) behavior seems more natural.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Apparently some people start a timer, switch to an empty tag and then let the
timer move a client to that empty tag. This change makes sure that this new
client will get the input focus in this case.
Signed-off-by: Uli Schlachter <psychon@znc.in>