When you have multiple sinks (resp. sources), the module used to display
the state of the most recently changed one. This changes remembers the
default sink name, and only records changes to that one.
Ipc destructor closes socket and thus wakes up SleeperThread which was
waiting for socket data in Ipc::handleEvent.
Ipc::handleEvent then proceeds with sending signal to already destroyed
object, causing heap-use-after-free Address Sanitizer error.
std::unique_ptr is not required here as the only benefit it gives is
stability of address on vector resize and it's easy to invalidate it
accidentaly. std::list provides the same guarantee of stable addresses
of the elements and correct destruction while avoiding smart pointer
overhead.
Also fixes#554, caused by incorrect usage of std::remove_if.
Fixes:
../src/modules/network.cpp:68:3: error: 'assert' was not declared in this scope
68 | assert(starts_with(read, category));
| ^~~~~~
../src/modules/network.cpp:6:1: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
5 | #include "util/format.hpp"
+++ |+#include <cassert>
6 |
To enable: use sway >= 1.2, compile waybar with `-Dgtk-layer-shell=enabled` meson option.
Original behavior could be restored at runtime by setting `"gtk-layer-shell": false` in waybar config.
gtk-layer-shell wants Gdk::Monitor instead of wl_output;
change code to deal with Gdk objects and slightly simplify it.
Requires gtkmm 3.22.0+ (first release with Gdk::Monitor support).
The fmt::format() function looks for the "{arg}" named argument
in the given "format" string which does not exist. It will fail
if the string contains any {...} curled-brace substring.
Consequently, any "on-click*" option's command line containing for
instance substring like "${var}" or "awk '{...}'" will crash the program.
Signed-off-by: Thomas Venriès <thomas.venries@gmail.com>
Fixes#479, because upstream does not intend to.
It may be less expensive to do that only once in a while, or to inotify-watch on /etc/timezone, but this is good enough.
Adds a `format-time` configuration for the battery module so that users
can configure how they want their remaining time to be displayed.
The default format remains the same as before, i.e. `{H} h {M} min`,
but users can choose something like `{H}:{M:02d}` to give an output
like `4:29` if wanted.