By default, generates an error message with the major/minor opcodes,
the error code and sequence number.
If available, it will use xcb-errors to generate an even better
description.
Since this struct only contained function pointers, make all modules
export those functions directly.
The plugin manager now defines a module interface struct, and fills it
it by dlsym:ing the functions that used to be in module_info.
All modules are expected to handle a call to content() after having
been instantiated.
I.e. modules *cannot* even expect run() to have started running.
Previously we allowed it on the bar, and on all particles. Now we also
allow it on all modules.
This allows us to specify a "default" font/foreground on a per-module
basis, having it applied to all the modules particles.
Module plugins are (still) built in <build-dir>/modules.
When installing, f00bar binary is installed to <install-dir>/bin, and
the module plugins to <install-dir>/lib/f00bar.
For this to work, we now also set RPATH correctly. Since the installed
module plugins end up in a different location then when building,
different settings is required for BUILD_RPATH and INSTALL_RPATH.
TODO: optimizations and proper cleanup
* We currently reload the shared library for each *instance* of the
module, and we do it twice; once when verifying, and once when
instantiating.
* The shared libraries are never dlclosed()
If the user hasn't specified a specific template for a workspace, try
to lookup a default one (the empty string).
This allows the user to configure a "fallback" template to be used for
"extra", or not-often-used workspaces.
Warn if volume and/or muted state is inconsistent (as we only expose a
single volume/muted state).
Also, don't query for current volume if max == 0 (i.e. typically a
digital output).
Finally, make absolutely sure that volume min is really less (or
equal) to volume max, and that the current volume level is between min
and max.