The waybar process does not exit instantaneously.
Signals may be recevied after main has started freeing resources.
When a worker thread is in `fgets` this time window can last forever.
An easy way to duplicate the crash is pressing ^C twice with a Hyprland module.
Thread 1 "waybar" received signal SIGSEGV, Segmentation fault.
spdlog::sinks::sink::should_log (this=0x5f620b542ca5,
msg_level=spdlog::level::info)
at /usr/src/debug/spdlog/spdlog-1.14.1/include/spdlog/sinks/sink-inl.h:13
13 return msg_level >= level_.load(std::memory_order_relaxed);
(gdb) p $_siginfo._sifields._sigfault.si_addr
$1 = (void *) 0x5f620b542cad
on sinkInfo callbacks, the default sink now has highest priority.
That fixes an issue that the volume indicator is not updated when
the changes the default output to another devices.
added PA_SINK_IDLE as valid state. PA_SINK_RUNNING is only true
if any sound output is happening on sink switch. Indicator should
also update when no sound is being played.
The current documentation for the custom module suggests mixing manual
(`{icon}`) and automatic (`{}`) indexing of format args. Newer versions
of the fmt library seem to not support this anymore (see issue #3605).
This commit introduces a name for the `text` output of the script, so
that `{text}` can now be used instead of `{}` in the configuration.
All the mode or visibility changes require `wl_surface_commit` to be
applied. gtk-layer-shell will attempt to force GTK to commit, but may
fail if the surface has stopped receiving frame callbacks[^1].
Thus, we could get stuck in a state where the bar is hidden and unable
to regain visibility.
To address this, a new API has been added to gtk-layer-shell,
`gtk_layer_try_force_commit`, which does `wl_surface_commit` with the
necessary safety checks to avoid corrupting GTK internal state.
Note: this change bumps gtk-layer-shell requirement to 0.9.0.
[^1]: https://github.com/wmww/gtk-layer-shell/issues/185
This fixes a major inconsistency with the swaybar implementation of
these modes[^1]. `overlay` layer no longer has security implications due
to a wide adoption of `ext-session-lock`, so it's safe to use.
Following config will restore the previous behavior:
```json
"modes": {
"hide": { "layer": "top" },
"overlay": { "layer": "top" }
},
```
[^1]: 2f7247e08a