Do it now since the future awful.popup and notification widget
also uses it.
The `load_ldoc.cmake` changes allow to include `.ldoc` blocks in
existing ldoc comments. Previously, it added some extra newlines
and an autogenerated comments saying the content below was imported.
The problem is that this prevented the system to be used for shared
function arguments.
This commit also renames the `wibar` argument table from `arg` to
`args` as the name has to be the same in the `wibox` and `wibar`
constructor for this to work.
The ratio, fixed and flex layout can now display a widget between
each layout elements.
The align layout was left out because it doesn't support spacing
As long as Awesome provides APIs that uses pixels are points, this
cannot be enabled by default.
For example, a wibar size defined in pixels may be too small to
render the text once a dense display is connected.
If g_date_time_format() fails, it returns a NULL pointer. This change
makes the textclock detect this and print a warning. This warning
contains 'g_date_time_format()' so that people can ask their favorite
search engine for the supported formats of this function. This warning
also contains the actual format string so that all the information is
available in one place and possible bug reports hopefully include the
format string.
Reference: https://github.com/awesomeWM/awesome/issues/2118
Signed-off-by: Uli Schlachter <psychon@znc.in>
This should help with covering the methods for detection/fallback during
tests.
Ref: https://github.com/awesomeWM/awesome/pull/2109#issuecomment-346224956
Uses xrdb -q to check for X server being available.
Ignores the following warning:
> W: awesome: beautiful: can't get colorscheme from xrdb (using fallback).
When a screen is in the process of being removed, it is still valid, but
no longer in the global list of screens (globalconf.screens). In this
time frame, trying to swap screens could cause a NULL pointer
dereference.
Fix this by throwing a Lua error in this case instead.
Fixes: https://github.com/awesomeWM/awesome/issues/2110
Signed-off-by: Uli Schlachter <psychon@znc.in>
- install luacov.runner in tests/_runner.lua.
- use Lua's `dofile` to execute the test files, which will give us
coverage for them.
- CMakeLists.txt: revert DO_COVERAGE env injection
- revert cd: make f absolute if not in source_dir
Not only does every va_start() need a corresponding va_end(), this is
also true for va_end(). Thus, buffer_addvf() needs to call va_end().
Found by Codacy.
Signed-off-by: Uli Schlachter <psychon@znc.in>
It might be well known that test-menubar.lua fails with "cannot do calls
on non-normal thread" when run under our Lua 5.3 build with coverage
tracking enabled. This new, extra assertion catches the error earlier
and in a different way. Since more assertions means more errors caught,
let's add this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The code in menubar.icon_theme naively implements the algorithm from the
base dir specification. This is a problem: On this system,
/usr/share/icons/{Adwaita,hicolor}/index.theme list 91, respectively 649
subdirectories. Since we check for three file extensions (png, svg,
xpm), this means that a failing icon lookup for the Adwaita theme checks
for (91+649)*3 = 2220 files (in practice it might be a bit better since
the directories have specific meanings, but still). That's insane.
Since we only use this code for looking up category icons anyway, just
deprecate this mess. Category icons are now looked up in the same way
that icons for individual applications are looked up.
Since menubar.init does not require("menubar.icon_theme"), this means
that menubar.icon_theme is no longer actually loaded. That's bad.
(Hopefully) Fixes: https://github.com/awesomeWM/awesome/issues/1496
Signed-off-by: Uli Schlachter <psychon@znc.in>
This is a slight API break, but should not cause many problems for
people. This makes parse_desktop_file() handle the type of keys
correctly, so that e.g. booleans are actually parsed as booleans. Also,
locale-sensitive entries are now looked up in a way that obeys the
current locale.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This replaces our own, hand-written parser of desktop files with the one
that GLib provides. No functional changes intended.
Signed-off-by: Uli Schlachter <psychon@znc.in>