Useful when using dynamic tags. The tags will be closed once
it is empty. This was part of Tyrannical for many years, but is
generally useful for other workflows too.
local t = awful.tag.add("my_tag",{volatile=true, screen=2})
awful.spawn("ayapp", {tag=t})
Any signal on a screen instance is also emitted on the screen class, so the here
can just connect to the screen class.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signals on instances are also emitted on the class and thus we can just connect
to the signal on the class here.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This code works just fine with non-integer table keys. Also, this is used by
awful.screen.focus_bydirection() and thus will be used with screen objects
instead of screen indicies when we get rid of screen indicies.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Apparently some versions of dbus kill the process with a failed assertion if
invalid UTF8 should be send out. Mine doesn't. Also, our behaviour of replacing
non-strings silently with strings is weird.
This commit thus makes converting from Lua to dbus fail if a non-string should
be sent as a string or if a string contains malformed UTF8.
Fixes: https://github.com/awesomeWM/awesome/issues/728
Signed-off-by: Uli Schlachter <psychon@znc.in>
This one actually uses the return value from the function (where's the
consistency?!), so the code is fixed to only pop the return value if there is
actually one.
Signed-off-by: Uli Schlachter <psychon@znc.in>
We called the keygrabber and told Lua we are expecting one return value, so Lua
will always get us one return value on the Lua stack. However, when an error
happens, nothing is pushed on the stack, but we still tried to pop the return
value. This corrupted the Lua stack.
The easiest fix is to just not ask for a return value that is not used anyway.
Not adding a test for this, because the test has to cause a Lua error which the
C code will then log to stderr and the test runner considers this a test
failure...
Fixes: https://github.com/awesomeWM/awesome/issues/735
Signed-off-by: Uli Schlachter <psychon@znc.in>
When e.g. test-leaks.lua fails, it will cause a Lua error before starting the
test runner. This means that the test will just hang, because nothing causes
awesome to quit.
Handle this by starting a timer when the test runner is loaded and quitting
awesome in there if no test run was started yet. This only works if all tests
load the runner before doing anything that could fail, so the require("_runner")
is moved to the beginning in every test.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes it possible to have the systray only visible on the primary screen,
which is the new default value. This also makes it possible to configure
directly on which screen the systray should be visible.
This breaks the API in the sense that people who use "the old method" to
configure the systray's screen possibly don't have a systray.
Fixes: https://github.com/awesomeWM/awesome/issues/724
Signed-off-by: Uli Schlachter <psychon@znc.in>
There's no point in having multiple instances of this, because there are no
per-instance settings and the systray can only be visible in a single place at a
time anyway.
Signed-off-by: Uli Schlachter <psychon@znc.in>
* Better widget names when using the declarative syntax
* Add ratio.get_ratio to avoid using the private API
* Also support `set_widget` when swapping widgets
Issues involve:
- :layout() had the wrong signature and expected a cr argument that was left
from when this was still the :draw() function.
- horizontal and vertical reflection were mixed up (I guess it has always been
this way?)
- The return value should be a table of widget placements. Instead it was just a
single widget placement.
This is broken since commit 85ab3f045b.
Fixes: https://github.com/awesomeWM/awesome/issues/718
Signed-off-by: Uli Schlachter <psychon@znc.in>
The documentation states that this function returns nil if the property does not
exist, but it actually returned nothing. And yes, in Lua this is a difference...