Commit Graph
87 Commits
Author SHA1 Message Date
Viktar Lukashonak 2d87bd5ba9 Drop mandatory hyprland dependency 2026-07-23 11:58:35 +03:00
Viktar Lukashonak 5bd3cd4805 cavaBump 2026-07-21 15:17:55 +03:00
Viktar Lukashonak 50f636236a man(waybar-cava): refresh and polish documentation
Synchronize the cava module man page with the current implementation:

- Fix scdoc table syntax (correct header/body cell prefixes)
- Add missing Waybar-side options: format-icons, vertex_shader, fragment_shader
- Remove options not consumed by the module (data_format, raw_target)
- Clarify option scope: raw-only, GLSL-only, and cava-config-only settings
- Update descriptions to match backend behavior:
  - ascii_range is derived from format-icons length
  - bar_height is ignored by Waybar
  - bar_delimiter is used for raw output
- Polish grammar, tighten structure, and fix example filenames
- Refresh STYLE and FRONTENDS sections to match the actual source
2026-07-15 15:46:37 +03:00
Viktar Lukashonak 52a5f74cd2 docs: merge coding conventions into CONTRIBUTING.md
Consolidate the standalone `CONVENTION.md` into `CONTRIBUTING.md` so that
all contributor guidelines live in a single, discoverable file.

Added sections:
- Language, build system, and formatting rules (Google style, clang-format)
- Naming conventions (PascalCase types, snake_case_ members, lowerCamelCase methods)
- Include ordering and header self-sufficiency requirements
- Class/module design patterns (AModule hierarchy, SafeSignal threading)
- JSON configuration and string handling guidelines
- GTK/Glib and OpenGL patterns
- Platform portability and RAII conventions
- Thread-safety rules (GTK single-threaded, background thread marshalling)
- Unsafe patterns to avoid (C-style casts, unbounded buffer copies)
- Singleton lifetime guidance (store config by value, no dangling refs)docs: merge coding conventions into CONTRIBUTING.md
2026-07-14 09:29:06 +03:00
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
Viktar Lukashonak 95f9922ccc cava bump 2026-03-19 11:03:08 +03:00
Viktar Lukashonak c8c3287be3 cava man 2025-12-20 15:35:20 +03:00
Viktar Lukashonak e03119fe94 Factory. cava_frontend 2025-12-09 18:13:45 +03:00
Viktar Lukashonak 3773021546 cavaGLSL 2025-12-07 23:08:55 +03:00
Viktar Lukashonak 52f4db1154 Moving GTK dispatcher into frontend 2025-12-05 10:04:52 +03:00
Viktar Lukashonak 13519ca5bf cava. nonsafe thread.= & cava bump 2025-11-26 13:26:32 +03:00
Viktar Lukashonak 966da11f3b cava bump & fixing memory leaks 2025-10-12 14:53:49 +03:00
Viktar Lukashonak 76d3b47ffd Cava back/front end transformation 2025-09-26 23:34:11 +03:00
Viktar Lukashonak cbab9c9713 spdlog bump 2025-09-25 21:46:13 +03:00
Viktar Lukashonak e85025f805 libCava bump: 0.10.4 2025-04-15 16:33:07 +03:00
Viktar Lukashonak e46a1c6bfc cava bump
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-09-28 00:57:02 +03:00
Viktar Lukashonak b4e97eb2f4 FreeBSD format fix
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-09-23 16:06:50 +03:00
Viktar Lukashonak 773b1d4806 Default value for cldYearShift_ = 1900/01/01
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-09-23 15:51:01 +03:00
Viktar Lukashonak 60a613ae51 cava bump: 0.10.2
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-05-23 16:15:48 +03:00
Viktar Lukashonak 5a1454ab31 Cava. $XDG_CONFIG_HOME validation
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-05-18 11:28:10 +03:00
Viktar Lukashonak b288fdf8c1 ISSUE#2240. Clock Gtk::Label as a calendar tooltip
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-05-17 20:17:33 +03:00
Viktar Lukashonak 5fe99ea0e1 Upower. Fix segmentation fault
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-05-10 00:00:47 +03:00
Viktar Lukashonak d7d4dca6ba libcava bump 0.10.1
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-02-17 18:20:03 +03:00
Viktar Lukashonak 7783c81861 Catch2 bump
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2024-01-04 17:22:27 +03:00
Viktar Lukashonak 7308893adb Happy clang. fmt9-10
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-11-13 09:59:50 +03:00
Viktar Lukashonak 86a38980e4 c++20. clock chrono API. STL + format
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-11-10 17:57:26 +03:00
Viktar Lukashonak 9012cebbf2 Happy Linter
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-10-31 23:31:58 +03:00
Viktar Lukashonak b9b89cce7e Happy linter
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-10-31 20:47:56 +03:00
Viktar Lukashonak e9a66d68b7 Fix debug mode. cava issue
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-10-31 20:27:00 +03:00
Viktar Lukashonak 106535e3eb tooltip-format spaces breaks pango format
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-07-29 23:46:35 +03:00
Viktar Lukashonak dae7794bdf Clock. Narrow seconds precision
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-07-25 00:08:13 +03:00
Viktar Lukashonak d01ce7d812 Rewview changes.
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-07-24 10:16:38 +03:00
Viktar Lukashonak 4d9e0ea802 time conversion between time zones
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-07-24 01:21:33 +03:00
Viktar Lukashonak 4dff1d4b2b cava man page
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-07-19 20:44:52 +03:00
Viktar Lukashonak 8fdd456fa9 cava bump
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-07-18 17:51:23 +03:00
Viktar Lukashonak d650c597f9 Renew clock man page
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-15 16:36:33 +03:00
Viktar Lukashonak 5196009656 Refresh Gentoo docker
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-15 13:58:33 +03:00
Viktar Lukashonak 4d8515930f Use local TZ, when user sets blank TZ in config
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-13 23:32:28 +03:00
Viktar Lukashonak 192cea97f2 Upower man
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-13 18:44:29 +03:00
Viktar Lukashonak 17af49d421 Upower native-path filter
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-09 18:22:24 +03:00
Viktar Lukashonak 6bf5b15c13 deprecated: implicit capture of 'this' via '[=]'
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-06 23:31:12 +03:00
Viktar Lukashonak a9779c2aa2 Happy Linter
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-06 23:06:11 +03:00
Viktar Lukashonak 3af1853260 Tray module cause error g_bus_unwatch_name()
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-06 23:02:36 +03:00
Viktar Lukashonak 87023c39f8 Small performance fixies
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-06 13:58:05 +03:00
Viktar Lukashonak f5ef13c7f1 Gentoo docker. Add iniparser
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-04-28 15:46:51 +03:00
Viktar Lukashonak 8c83af75a1 happy linter
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-04-28 15:38:34 +03:00
Viktar Lukashonak e253c34cd4 cava bump
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-04-28 13:38:35 +03:00
Viktar Lukashonak a5607b66ca Cava module
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-04-15 02:36:15 +03:00
Viktar Lukashonak 6de3b58d6a ISSUE#2073
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-04-13 17:16:03 +03:00
Viktar Lukashonak 61a6c00c02 Happy clang 2023-03-02 16:57:32 +03:00
Viktar Lukashonak 4cb7e55a91 ISSUE #878. Try catch Clock timezones
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-03-02 10:10:34 +03:00
Viktar Lukashonak 43862ceb34 ISSUE #878. Try catch Clock timezones 2023-03-02 10:07:10 +03:00
Viktar Lukashonak ce16e029ed Issue #2030. AModule enable_click & enable_scroll
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-03-01 23:39:36 +03:00
Viktar Lukashonak e25a7c9719 ISSUE#1977. AModule implements module actions call
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-02-28 15:32:28 +03:00
Viktar Lukashonak 677cbb3384 When no one timezone is provided use system's TZ
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-02-04 23:48:25 +03:00
Viktar Lukashonak b5ad77ea8c Avoid of unnecessary string transformation
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-02-02 13:26:05 +03:00
Viktar Lukashonak 5d8f9a8273 Clock. Formating simplify
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-01-27 15:57:18 +03:00
Viktar Lukashonak f3f0b008c6 Clock. Proper handletoggle propagation
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-01-25 16:56:45 +03:00
Viktar Lukashonak 3b28af8b51 Merge remote-tracking branch 'origin/master' into YearCalendar
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-01-23 18:49:45 +03:00
Viktar Lukashonak ed31b20c26 Merge branch 'master' into YearCalendar
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-01-23 18:42:32 +03:00
Viktar Lukashonak 995802e8ae ISSUE#1874 - happy linter 2022-12-14 16:49:03 +03:00
Viktar Lukashonak 0079092699 ISSUE#1874
1. Calendar. Weeks. Fix right paddings when first days of the week is
Monday
2. Fix small perfomrance penalty(avoid of defining parameter in the
month loop)
3. Small name convention for format string variables
2022-12-14 16:43:23 +03:00
Viktar Lukashonak 4c4d09992e Regular expression improved 2022-12-10 18:36:58 +03:00
Viktar Lukashonak 9218968d2f Wrong assigning 2022-12-10 17:55:21 +03:00
Viktar Lukashonak a08967e008 Happy linter 2022-12-10 16:54:26 +03:00
Viktar Lukashonak 272c638f7e Happy linter 2022-12-10 16:48:22 +03:00
Viktar Lukashonak 57ad7f9536 ISSUE#1877 Calendar week numbers
1. Let's do code simplier
2. Week format using regexp. Needs when user provide additional
characters in format string and need to align week days according
3. Week format has got default formats: ":%U",":%V"
4. Week number is based on the first day of the week now. The output is
the same as of date library now.
5. Avoiding of unnecessary operations
2022-12-10 14:02:15 +03:00
Viktar Lukashonak e9e5780aae Calendar scrolling opportunity 2022-08-06 13:55:20 +03:00
Viktar Lukashonak 061ad13082 Bug: tripple click uses wrong event type 2022-08-06 13:52:00 +03:00
Viktar Lukashonak 36aa22189b Last weekday applies Unix fmt 2022-06-24 16:44:06 +03:00
Viktar Lukashonak 7f995507fe std::filesystem::path is a string representation 2022-05-14 17:10:44 +03:00
Viktar Lukashonak b39a8ede6c Issue#1556. Battery module: wrong string comparison
1. battery.hpp - added local bool variable. Force to print warnings the
only once in order to warn user about wrong battery configuraion. And
does not bring a mess when the battery is turned off (gamepads, etc.)
2. dir_name is an object which takes a part in comparison. So converted to the string.
2022-05-14 16:56:46 +03:00
Viktar Lukashonak 315ea991bc Calendar module: localization issue #1552 Linter #60 2022-05-13 23:56:08 +03:00
Viktar Lukashonak bd0f6128d3 Revert "Waybar. Issue#1552. Calendar module, LC_TIME variable"
This reverts commit 7b7ee41e13.
2022-05-13 22:58:38 +03:00
Viktar Lukashonak 5a014305ec Revert "Issue#1552. Calendar module, LC_TIME variable"
This reverts commit 448b413eca.
2022-05-13 22:58:00 +03:00
Viktar Lukashonak e615612bf4 Calendar module: localization issue #1552 2022-05-13 18:51:32 +03:00
Viktar Lukashonak 448b413eca Issue#1552. Calendar module, LC_TIME variable 2022-05-13 12:54:18 +03:00
Viktar Lukashonak 7b7ee41e13 Waybar. Issue#1552. Calendar module, LC_TIME variable 2022-05-12 19:04:45 +03:00
Viktar Lukashonak f4cc088d2f Waybar. Issue#1068. Double/Triple events. Removed unnecessary including 2022-03-29 13:47:38 +03:00
Viktar Lukashonak b086e2f995 Waybar. Issue#1068. Double/Triple events 2022-03-29 12:26:05 +03:00
Viktar Lukashonak 4a457648f9 Waybar. Clock module. Calendar - custom output formats 2022-03-27 11:15:56 +03:00
Viktar Lukashonak 1d2a381b5f Waybar. Clock module - weeknum fix for the left side 2022-03-25 18:51:59 +03:00
Viktar Lukashonak 2d87bcb1ab https://github.com/Alexays/Waybar/issues/1315. Option to display week number on calendar 2022-03-24 15:41:50 +03:00
Viktar Lukashonak 6946288053 PR #1485 review 2022-03-17 11:31:06 +03:00
Viktar Lukashonak 9f337db2d2 Hide/Unhide module when "format*" is empty. 2022-03-16 15:50:00 +03:00
Viktar Lukashonak 37d87be3c1 Add supporting of the gamepads batteries 2022-03-14 17:53:19 +03:00
Viktar Lukashonak 8aee7492d4 Plug/Unplug batteries on hot(useful for gamepads) 2022-03-14 17:12:05 +03:00