This tried to use awful, but didn't load awful itself. Kids, this is why you
should make your variables local!
Signed-off-by: Uli Schlachter <psychon@znc.in>
After this change, fit_widget() enforces that a widget cannot ask for more space
than was offered to it. This also fixes a rounding issue in the flex layout
where its fit function would return too small numbers.
Thanks to this, lots of "XXX" comments in spec/ disappear.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In expand nodes "none" and "outside", the variable size_remains describes how
much space is available for the first/third widget. Everything else is used by
the second widget. Thus, fitting the second widget to anything involving
size_remains is wrong. Instead, this commit uses the correct value.
This also fixes a messed up argument order for horizontal align layouts.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The tooltip might be partly outside of the screen, and especially the
workarea, e.g. for tooltips on the tasklist.
Calling `awful.placement.no_offscreen` makes sure that it is fully
inside, and will even restrict it to the workarea, not only to the screen.
Closes https://github.com/awesomeWM/awesome/pull/409.
When using Xephyr, this already starts the server with -noreset, but for Xvfb we
also need this flag. Without this flag, the DPI value that is set via xrdb gets
lost at server reset.
This wasn't a problem before commit 6d4837a53a. That commit moved the launch
of the dbus session after the setting of the DPI. So previously, waiting for
server startup was half broken (the dbus session already tried to connect to the
server to check for when it shuts down), but due to this no server reset
occurred and thus the DPI was correctly applied. After this commit, the server
immediately resets after xrdb is done setting the DPI and the value set is lost.
Signed-off-by: Uli Schlachter <psychon@znc.in>
GLib is already used in three part of awesome (awful.widget.textclock,
gears.timer and menubar.utils). Gio will soon be added.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds three new arguments to awesome.spawn() that tell it to return pipes
for stdin, stdout and stderr of the spawned process.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds luaA_getopt_integer, luaA_optinteger and luaA_checkinteger.
Lua 5.2 does not have support for this, but it would be available in Lua
5.3.
Closes https://github.com/awesomeWM/awesome/pull/320.
This table contains the drawable, wibox and titlebar that we are drawing on, but
also includes the screen and the DPI of that screen. This allows widgets to
depend on the DPI in their rendering.
Signed-off-by: Uli Schlachter <psychon@znc.in>
With the second argument being 2, the traceback will not include the error
handling function, but instead end at the actual place of the error.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Having two modules named "base" is confusing and "wibox.layout" doesn't contain
much useful stuff. This is a first step for removing wibox.layout by moving a
function which should only ever be used internally in awesome.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds gears.timer.start(timeout, callback) that creates a timer object and
connects a callback to it, all in one go.
Additionally, this adds gears.timer.weak_start(timeout, callback). The weak
version still allows the callback function to be garbage collected and will then
stop the timer.
This was tested with the following code:
require("gears.timer").start(0.3, function()
print("ping")
if collectgarbage("step", 500) then
print("collection done")
error("err")
end
return true end)
require("gears.timer").weak_start(0.1, function()
io.stdout:write(".")
return true
end)
After a full collection cycle, both timers are stopped. The first one is stopped
because of the error() that it generated. The second one is stopped because the
callback function was garbage collected.
Ref: https://github.com/awesomeWM/awesome/issues/216
Signed-off-by: Uli Schlachter <psychon@znc.in>
This factors out a function wait_until_success that runs some command until it
succeeds (with a timeout) and uses this function in the two places where this
was already done before.
Note that this removes the "kill -0" trick for early exit again and instead will
use the timeout in case awesome dies during startup.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When this script is not run under Travis, it will prepare a temporary config
file and a theme file that point to the files that were not yet installed.
Signed-off-by: Uli Schlachter <psychon@znc.in>