Viktar Lukashonak 5c979152de refactor(cava): fix thread-safety, resource leaks, and style violations
Comprehensive refactor of the cava module backend and frontends.

Style & naming
- Rename Cava -> CavaRaw; snake_case methods -> lowerCamelCase
- Replace NULL with nullptr; replace C-style casts with static_cast
- Add explicit standard-library includes (<memory>, <string>, <chrono>)
- Fix missing trailing underscores on member variables

Architecture
- Remove Gtk::GLArea multiple inheritance in CavaGLSL (composition)
- Return std::unique_ptr from factory; add doAction() to GLSL variant
- Encapsulate thread timing arithmetic in AdaptiveDelay struct

Thread safety & correctness
- Replace raw sigc::signal with SafeSignal for cross-thread marshalling
- Fix data race between loadConfig() and out_thread_ (recursive_mutex)
- Fix audio_raw shallow-copy use-after-free via deep-copy AudioRaw payload
- Make loadConfig() exception-safe with CavaConfigGuard RAII
- Fix blocking read_thread_ race on shutdown (condition_variable + timeout join)
- Fix isSilent() data race (acquire pthread mutex)
- Eliminate doUpdate() recursion (iteration instead)
- Guard audio_raw_clean() against uninitialized state
- Fix format-icons underflow and cava_config buffer overflow
- Store config by value to prevent dangling references on reload
- Cache frontend config and refresh on runtime changes
- Fix signed-char icon lookup bug on x86
- Prevent Json::Value mutation bloat via const-ref lookups
- Broaden exception catches in worker threads (std::exception)

Resource management & GL robustness
- Fix OpenGL resource leaks (persist VBO/IBO/VAO; explicit destructor cleanup)
- Fix shader error handling crashes (valid infoLog allocation)
- Cache uniform locations instead of querying per frame
- Fix gradient color uninitialized stack memory (zero-init + clamped count)
- Fix shader time uniform integer division bug (float arithmetic)
- Add explicit VAO bind in onRender()
- Handle runtime surface config changes independently of shader changes
- Clamp negative gradient_count before GL upload

Follow-up
- Singleton API split (inst() + configure()) intentionally deferred to a
  dedicated PR because it changes the public constructor contract.
2026-07-13 19:50:09 +03:00
2026-07-06 16:56:17 +02:00
2026-07-06 16:56:17 +02:00
2018-08-09 20:50:11 +02:00
2022-04-06 08:37:19 +02:00
2019-04-18 15:55:45 +02:00
2026-03-19 00:29:01 -05:00
2018-08-09 20:50:11 +02:00
2025-08-23 18:25:45 +02:00
2025-04-15 14:56:28 -05:00
2026-02-01 00:18:11 +00:00
2025-01-01 06:34:11 -05:00
2026-07-04 01:36:23 +02:00
2018-10-01 18:56:58 +02:00
2018-10-01 18:56:58 +02:00

Waybar

License Donate CI Release

Waybar

Highly customizable Wayland bar for Sway and wlroots-based compositors.
Available in all major distributions.

Installation · Wiki · Configuration · Styling · Examples · FAQ

Features

Compositor integration

Compositor Workspaces / Tags Window Layout Language Mode
Sway
River
Hyprland
Niri
Mango
DWL
Wayfire

DWL requires the dwl IPC patch.

Modules

…and more. Every module is documented on the wiki (see the Modules sidebar).

Getting started

git clone https://github.com/Alexays/Waybar
cd Waybar
meson setup build
ninja -C build
./build/waybar          # run without installing

Waybar launches with a sensible default config. To make it yours, copy the default config and stylesheet into ~/.config/waybar/ and edit them. The Configuration and Styling guides cover every option, and Examples has ready-to-use community setups.

Installation

Waybar is packaged by most distributions:

Packaging status

An Ubuntu PPA with more recent versions is available here.

Building from source

git clone https://github.com/Alexays/Waybar
cd Waybar
meson setup build
ninja -C build
ninja -C build install   # optional
Runtime dependencies
gtkmm3       jsoncpp      libsigc++    fmt          wayland
chrono-date  spdlog       xkbregistry  libgtk-3-dev upower

libpulse             [Pulseaudio module]
libnl                [Network module]
libappindicator-gtk3 [Tray module]
libdbusmenu-gtk3     [Tray module]
libmpdclient         [MPD module]
libsndio             [sndio module]
libevdev             [KeyboardState module]
Build dependencies
cmake   meson   scdoc   wayland-protocols
Install dependencies — Ubuntu
sudo apt install \
  clang-tidy gobject-introspection libdbusmenu-gtk3-dev libevdev-dev \
  libfmt-dev libgirepository1.0-dev libgtk-3-dev libgtkmm-3.0-dev \
  libinput-dev libjsoncpp-dev libmpdclient-dev libnl-3-dev libnl-genl-3-dev \
  libpulse-dev libsigc++-2.0-dev libspdlog-dev libwayland-dev scdoc upower \
  libxkbregistry-dev
Install dependencies — Arch
pacman -S --asdeps \
  gtkmm3 jsoncpp libsigc++ fmt wayland chrono-date spdlog gtk3 \
  gobject-introspection libgirepository libpulse libnl libappindicator-gtk3 \
  libdbusmenu-gtk3 libmpdclient sndio libevdev libxkbcommon upower meson \
  cmake scdoc wayland-protocols glib2-devel

Contributing

Contributions are welcome — see CONTRIBUTING.md. The style guidelines are Google's C++ style.

Docs live in the man pages. Module documentation is written in man/ (scdoc) and auto-synced to the wiki. Edit the man page, not the wiki — see .github/wiki.

Caution

Distributions of Waybar are only released on the official GitHub page.
Waybar does not have an official website. Do not trust any site claiming to be official.

License

Waybar is licensed under the MIT license. See LICENSE for details.

S
Description
Fork of https://github.com/Alexays/Waybar to work with my fork of river
Readme MIT
9.8 MiB
Languages
C++ 93.7%
Shell 2.2%
Meson 2%
Python 0.7%
CSS 0.4%
Other 1%