From 4961a7dcfc62cc93ad0746c074c8419aeb025111 Mon Sep 17 00:00:00 2001 From: raffael0 <43984260+raffael0@users.noreply.github.com> Date: Fri, 15 Apr 2022 23:50:04 +0200 Subject: [PATCH] feat(tray): Position using a module (#2595) Closes: #1526 Closes: #314 * debug log * semi-working prototype. works on the left and the center but not on the right * fixes formatting * fixes tests * - fixed tray_width_change signal - implements suggestions * - fixes error with tray positioning * - tries to fix tests. Does not work * - fixes tests * - implemented suggestions * reverted formatting in comake and doc * - changed unique_ptr to const reference * - fixed formatting errors in code * - actually fixed formatting(ran clang-format) * - implemented suggestions * - Added CHANGELOG.md entry(not sure about wording) * - removed bar_settings from tray_manager::setup * - fixed issue from rebase * - fixed issue with tests from rebase * implemented suggestions * Update CHANGELOG.md Co-authored-by: Patrick Ziegler --- CHANGELOG.md | 1 + include/components/bar.hpp | 3 +- include/components/renderer.hpp | 2 + include/components/renderer_interface.hpp | 2 + include/events/signal.hpp | 6 +++ include/events/signal_fwd.hpp | 2 + include/modules/meta/factory.hpp | 3 ++ include/modules/tray.hpp | 29 ++++++++++ include/tags/context.hpp | 9 +++- include/tags/dispatch.hpp | 3 +- include/tags/types.hpp | 1 + include/x11/tray_manager.hpp | 16 ++++-- src/CMakeLists.txt | 2 + src/components/bar.cpp | 12 ++--- src/components/builder.cpp | 3 ++ src/components/renderer.cpp | 8 +++ src/modules/tray.cpp | 40 ++++++++++++++ src/tags/context.cpp | 8 +++ src/tags/dispatch.cpp | 11 ++-- src/tags/parser.cpp | 2 + src/x11/tray_manager.cpp | 64 ++++++++++++++--------- tests/unit_tests/tags/dispatch.cpp | 8 +++ 22 files changed, 190 insertions(+), 45 deletions(-) create mode 100644 include/modules/tray.hpp create mode 100644 src/modules/tray.cpp diff --git a/CHANGELOG.md b/CHANGELOG.md index afa70bd5..5ce7c11e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `internal/pulseaudio`: `reverse-scroll` option ([`#2664`](https://github.com/polybar/polybar/pull/2664)) - `custom/script`: Repeat interval for script failure (`interval-fail`) and `exec-if` (`interval-if`) ([`#943`](https://github.com/polybar/polybar/issues/943), [`#2606`](https://github.com/polybar/polybar/issues/2606), [`#2630`](https://github.com/polybar/polybar/pull/2630)) - `custom/text`: Loads the `format` setting, which supports the `