There are cases where systemd-logind is not used/running. Result is
that bcklight module will not run.
Add an option that, when set to false, allows backlight module to
work without systemd-logind.
Previously, string JSON values were special cased to be provided as
bare strings, which means that CFFI modules have to either know what
type each value is expected to be, or use a heuristic such as trying to
decode and then treating the value as a string on failure.
Instead, we can always return JSON, and let the downstream consumer
handle deserialising the value into whatever type is expected.
The new behaviour is gated on a new ABI version 2: modules built against
version 1 will continue to get the old behaviour.
Some drivers (example: qualcomm-battmgr, present on Snapdragon X1
laptops) expose the current_now and power_now values in sysfs as
negative int when the device is discharging, positive when charging.
This breaks the battery runtime estimation in Waybar, as it expects a
uint32 for power_now.
Change the battery module to use the absolute values of current_now and
power_now.
This file uses std::sort and does not import correct header.
Compilation with libstdc++ worked due to some indirect import, but compilation with LLVM libc++ fails.
Updates `Config::tryExpandPath()` to return a vector of expanded path
matches instead of a single path wrapped in an optional, with an empty
vector indicating no matches.
`Config::resolveConfigIncludes()` iterates over all of these matches,
while other instances of path expansion (such as finding the base config
path) retain their existing behavior and only use the first match.
Without this, markup characters like [&><] will be injected directly
into the Label. Escaping them makes sure that the values will be printed
exactly as they appear in the window title or layout symbol.
Signed-off-by: K. Adam Christensen <pope@shifteleven.com>