Add a new volume widget that is using pactl only for controlling volume
and selecting sources and sinks. It therefore works with PulseAudio or
PipeWire as backend, unlike the original Volume widget.
The code is split as follows:
- volume.lua contains the UI logic
- pactl.lua contains the pactl interfacing and output parsing
- utils.lua contains some shared helper routines
It is heavily based on the original Volume code and supports the same
configuration options and uses the same widget code.
It appears that `ps` doesn't support using custom separators (e.g. here: '|') on all OSes. This replaces it with hardcoded lengths when known (cpu, mem, etc...).
E.G. on a debian bookworm machine this is what it returns:
```
ps -eo '%p|%c|%C|' -o "%mem" -o '|%a' --sort=-%cpu
error: improper AIX field descriptor
```
The code to parse the output of `acpi -i` is fragile as it does not
guarantee that the same number of battery status and capacities are
read. This causes a wrong computation of the total charge level when
batteries of status "Unknown" are reported.
For instance, this is what `acpi -i` reports with a Wacom Intuos S
attached to a Thinkpad T460s:
$ acpi -i
Battery 0: Unknown, 0%, rate information unavailable
Battery 1: Not charging, 98%
Battery 1: design capacity 1857 mAh, last full capacity 1513 mAh = 81%
Battery 2: Not charging, 98%
Battery 2: design capacity 2051 mAh, last full capacity 1711 mAh = 83%
Fix the code by guaranteeing that for each battery status parsed there
is also a capacity, which is zero if no capacity can be parsed. This
effectively causes the exclusion of such batteries when computing the
total charge level.
This patch fixes luacheck warnings in brightness plugin:
brightness-widget/brightness.lua:60:1:
inconsistent indentation (SPACE followed by TAB)
brightness-widget/brightness.lua:63:60:
line contains trailing whitespace
Introduces a minimum distance between the artist/title textboxes equal
in width to 1 space character in the specified widget font.
This should ensure that the artist/title textboxes are not crammed
together in the event that an icon cannot be displayed.
Allows specifying a custom location for the sp binary via widget config.
This is intended for users who don't want to add the sp binary to their
system PATH.