Second argument of substr is the length of the substring, _not_ the position. With positions, it's better to do like this.
Example:
```sh
[2023-01-29 13:08:00.927] [debug] hyprland IPC received activelayout>>ITE Tech. Inc. ITE Device(8910) Keyboard,Russian (with Ukrainian-Belorussian layout)
[2023-01-29 13:08:00.927] [debug] kbName is ITE Tech. Inc. ITE Device(8910) Keyboard,Russian (with
```
After the fix it's correct:
```sh
[2023-01-29 13:11:11.408] [debug] hyprland IPC received activelayout>>ITE Tech. Inc. ITE Device(8910) Keyboard,Russian (with Ukrainian-Belorussian layout)
[2023-01-29 13:11:11.408] [debug] kbName is ITE Tech. Inc. ITE Device(8910) Keyboard
```
Use chrono Calendars and Time Zones (P0355R7, P1466R3) when available
instead of the `date` library.
Verified with a patched build of a recent GCC 13 snapshot.
- Add tests for global locale.
- Warn about missing locales.
- Downgrade REQUIRE to CHECK.
- Skip tests if localized formatting does not work as expected.
There were two main issues with fmtlib and C++20 mode:
- `fmt::format` defaults to compile-time argument checking and requires
using `fmt::runtime(format_string)` to bypass that.
- `std::format` implementation introduces conflicting declarations and
we have to specify the namespace for all `format`/`format_to` calls.
The structure was used to pass the locale instance to the date
formatter. All the supported versions of `fmt` are passing the locale
parameter via `FormatContext.locale()` so we can remove the struct and
simplify the code.
While we at it, drop `date::make_zoned` in favor of CTAD on a
`date::zoned_time` constructor.
In order to fix the issue, the default node name is cached rather than
the default node id. This is due to ids being unstable. So now when the
object manager is installed (ie ready), the default node name is
retrieved and stored for later.
Now when the mixer changed signal is emitted, the id of the changed node
is used to get the node from the object manager. The nodes name is
grabbed off that node and compared against the default node name, if
they match the volume is updated. Some safeguarding has been added such
that if the node cannot be found off the object manager, it's ignored.
Additionally, the "changed" signal on the default nodes api is now
utilized to update the default node name if it has changed. This way if
the default node changes, the module will be updated with the correct
volume and node.nick.
This adds additional debug logging for helping diagnose wireplumber
issues.
This also adds the wireplumber man page entry to the main waybar
supported section.
Provides CSS classes empty, floating, tabbed, tiled, solo, stacked and
app_id.
Adds offscreen-css bool option (default false), only effective when
"all-outputs" is true. This adds styles on outputs without focused
node, according to its focused workspaces window situation.
Adds an "offscreen-css-text" string option (default empty), only
effective when "all-outputs" and "offscreen-style" are set. This
is shown as a text on outputs without a focused node.
Adds a "show-focused-workspace" bool option (default false) to indicate
the workspace name if the whole workspace is focused when nodes are
also present. If not set, empty text is shown, but css classes
according to nodes in the workspace are still applied.
Limitation:
When the top level layout changes, there is no sway event so the
module cannot react. Perhaps in the future recurring polling can
be added to go around this limitation.