From 17bb5643aec1ec67d7a0c45bfc91ad806b842a75 Mon Sep 17 00:00:00 2001 From: mazunki Date: Tue, 9 Nov 2021 18:38:07 +0100 Subject: [PATCH 01/22] explicitly checking for errors to silence unused variable warnings when writing to fd --- include/util/command.hpp | 4 +++- src/modules/sway/ipc/client.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/util/command.hpp b/include/util/command.hpp index 3a38da3..d3a1e43 100644 --- a/include/util/command.hpp +++ b/include/util/command.hpp @@ -68,7 +68,9 @@ inline int close(FILE* fp, pid_t pid) { inline FILE* open(const std::string& cmd, int& pid) { if (cmd == "") return nullptr; int fd[2]; - pipe(fd); + if (pipe(fd) != 0){ + throw std::runtime_error("Couldn't open a file descriptor"); + } pid_t child_pid = fork(); diff --git a/src/modules/sway/ipc/client.cpp b/src/modules/sway/ipc/client.cpp index 58aed60..1111746 100644 --- a/src/modules/sway/ipc/client.cpp +++ b/src/modules/sway/ipc/client.cpp @@ -14,12 +14,16 @@ Ipc::~Ipc() { if (fd_ > 0) { // To fail the IPC header - write(fd_, "close-sway-ipc", 14); + if (write(fd_, "close-sway-ipc", 14) == -1) { + std::runtime_error("Couldn't close Sway IPC through fd"); + } close(fd_); fd_ = -1; } if (fd_event_ > 0) { - write(fd_event_, "close-sway-ipc", 14); + if (write(fd_event_, "close-sway-ipc", 14) == -1) { + std::runtime_error("Couldn't close Sway IPC through fd_event"); + } close(fd_event_); fd_event_ = -1; } From b0eab5d793e48af1fcfc4b281aab6bfbd10b769b Mon Sep 17 00:00:00 2001 From: mazunki Date: Tue, 9 Nov 2021 19:03:15 +0100 Subject: [PATCH 02/22] maybe we shouldn't actually runtime error, but still doing a check --- include/util/command.hpp | 2 +- src/modules/sway/ipc/client.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/util/command.hpp b/include/util/command.hpp index d3a1e43..4920333 100644 --- a/include/util/command.hpp +++ b/include/util/command.hpp @@ -69,7 +69,7 @@ inline FILE* open(const std::string& cmd, int& pid) { if (cmd == "") return nullptr; int fd[2]; if (pipe(fd) != 0){ - throw std::runtime_error("Couldn't open a file descriptor"); + // std::runtime_error("Couldn't open a file descriptor"); } pid_t child_pid = fork(); diff --git a/src/modules/sway/ipc/client.cpp b/src/modules/sway/ipc/client.cpp index 1111746..15bdf1e 100644 --- a/src/modules/sway/ipc/client.cpp +++ b/src/modules/sway/ipc/client.cpp @@ -15,14 +15,14 @@ Ipc::~Ipc() { if (fd_ > 0) { // To fail the IPC header if (write(fd_, "close-sway-ipc", 14) == -1) { - std::runtime_error("Couldn't close Sway IPC through fd"); + //std::runtime_error("Couldn't close Sway IPC through fd"); } close(fd_); fd_ = -1; } if (fd_event_ > 0) { if (write(fd_event_, "close-sway-ipc", 14) == -1) { - std::runtime_error("Couldn't close Sway IPC through fd_event"); + //std::runtime_error("Couldn't close Sway IPC through fd_event"); } close(fd_event_); fd_event_ = -1; From e10c9dd011e394b734be7bab6fc2ca6885f9de1f Mon Sep 17 00:00:00 2001 From: mazunki Date: Tue, 9 Nov 2021 19:04:05 +0100 Subject: [PATCH 03/22] changing want_route_dump to default to true, since we say we have gwaddr support --- src/modules/network.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/network.cpp b/src/modules/network.cpp index 99ccd8e..d5f8012 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -88,7 +88,7 @@ waybar::modules::Network::Network(const std::string &id, const Json::Value &conf family_(config["family"] == "ipv6" ? AF_INET6 : AF_INET), efd_(-1), ev_fd_(-1), - want_route_dump_(false), + want_route_dump_(true), want_link_dump_(false), want_addr_dump_(false), dump_in_progress_(false), @@ -121,7 +121,7 @@ waybar::modules::Network::Network(const std::string &id, const Json::Value &conf } if (!config_["interface"].isString()) { - // "interface" isn't configure, then try to guess the external + // "interface" isn't configured, then try to guess the external // interface currently used for internet. want_route_dump_ = true; } else { From bb7b376fa6edc121890021ed191cdf497a5df66f Mon Sep 17 00:00:00 2001 From: mazunki Date: Wed, 24 Nov 2021 01:37:21 +0100 Subject: [PATCH 04/22] removed commented useless runtime errors --- include/util/command.hpp | 1 - src/modules/sway/ipc/client.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/include/util/command.hpp b/include/util/command.hpp index 4920333..9c4305a 100644 --- a/include/util/command.hpp +++ b/include/util/command.hpp @@ -69,7 +69,6 @@ inline FILE* open(const std::string& cmd, int& pid) { if (cmd == "") return nullptr; int fd[2]; if (pipe(fd) != 0){ - // std::runtime_error("Couldn't open a file descriptor"); } pid_t child_pid = fork(); diff --git a/src/modules/sway/ipc/client.cpp b/src/modules/sway/ipc/client.cpp index 15bdf1e..ea1a3c5 100644 --- a/src/modules/sway/ipc/client.cpp +++ b/src/modules/sway/ipc/client.cpp @@ -22,7 +22,6 @@ Ipc::~Ipc() { } if (fd_event_ > 0) { if (write(fd_event_, "close-sway-ipc", 14) == -1) { - //std::runtime_error("Couldn't close Sway IPC through fd_event"); } close(fd_event_); fd_event_ = -1; From 2301788a810b64be9361b15fbd8f510002c74cc4 Mon Sep 17 00:00:00 2001 From: mazunki Date: Sat, 8 Jan 2022 01:44:46 +0100 Subject: [PATCH 05/22] created a hotfix for libfmt-8.1.0 and above --- src/modules/clock.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/clock.cpp b/src/modules/clock.cpp index 7e7d742..96fb34a 100644 --- a/src/modules/clock.cpp +++ b/src/modules/clock.cpp @@ -233,8 +233,9 @@ struct fmt::formatter : fmt::formatter { template auto format(const waybar_time& t, FormatContext& ctx) { #if FMT_VERSION >= 80000 - auto& tm_format = specs; +//auto& tm_format = specs; #endif - return format_to(ctx.out(), "{}", date::format(t.locale, fmt::to_string(tm_format), t.ztime)); +// return format_to(ctx.out(), "{}", date::format(t.locale, fmt::to_string(tm_format), t.ztime)); + return fmt::formatter::format((const std::tm&) t, ctx); } }; From 3a6e5be59d2839f9187a88c6449ff64f74e11f8e Mon Sep 17 00:00:00 2001 From: nullobsi Date: Fri, 14 Jan 2022 10:36:24 -0800 Subject: [PATCH 06/22] Use locale when formatting clock --- src/modules/clock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/clock.cpp b/src/modules/clock.cpp index b0a6776..6aa5afb 100644 --- a/src/modules/clock.cpp +++ b/src/modules/clock.cpp @@ -99,7 +99,7 @@ auto waybar::modules::Clock::update() -> void { // As date dep is not fully compatible, prefer fmt tzset(); auto localtime = fmt::localtime(std::chrono::system_clock::to_time_t(now)); - text = fmt::format(format_, localtime); + text = fmt::format(locale_, format_, localtime); } else { text = fmt::format(format_, wtime); } From 27df7a9aa7c76de901ad3ad8f9c5fcb1b3af3d8d Mon Sep 17 00:00:00 2001 From: Kevin Locke Date: Sun, 23 Jan 2022 18:36:59 -0700 Subject: [PATCH 07/22] battery: read status with spaces According to the [sysfs class power ABI], /sys/class/power_supply//status may contain "Not charging". This is already handled by status_gt() and update() (where ' ' is converted to '-' for use in config keys) but was not being read due to skipws. Read with std::getline() to handle this case. [sysfs class power ABI]: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power Fixes: #1139 Signed-off-by: Kevin Locke --- src/modules/battery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp index 2656769..c0075a4 100644 --- a/src/modules/battery.cpp +++ b/src/modules/battery.cpp @@ -161,7 +161,7 @@ const std::tuple waybar::modules::Battery::g uint32_t energy_now; uint32_t energy_full_design; std::string _status; - std::ifstream(bat / "status") >> _status; + std::getline(std::ifstream(bat / "status"), _status); // Some battery will report current and charge in μA/μAh. // Scale these by the voltage to get μW/μWh. From 667d0a45f46d0b2fc34b300e639b035d7c091345 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 24 Jan 2022 09:20:43 +0100 Subject: [PATCH 08/22] Update command.hpp --- include/util/command.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/util/command.hpp b/include/util/command.hpp index 9c4305a..5f398e1 100644 --- a/include/util/command.hpp +++ b/include/util/command.hpp @@ -69,6 +69,8 @@ inline FILE* open(const std::string& cmd, int& pid) { if (cmd == "") return nullptr; int fd[2]; if (pipe(fd) != 0){ + spdlog::error("Unable to pipe fd"); + return nullptr; } pid_t child_pid = fork(); From 65dd245362fb203942b4a5a968e755a33ed880a6 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 24 Jan 2022 09:21:56 +0100 Subject: [PATCH 09/22] Update clock.cpp --- src/modules/clock.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/clock.cpp b/src/modules/clock.cpp index 96fb34a..8a0254d 100644 --- a/src/modules/clock.cpp +++ b/src/modules/clock.cpp @@ -233,9 +233,8 @@ struct fmt::formatter : fmt::formatter { template auto format(const waybar_time& t, FormatContext& ctx) { #if FMT_VERSION >= 80000 -//auto& tm_format = specs; + auto& tm_format = specs; #endif -// return format_to(ctx.out(), "{}", date::format(t.locale, fmt::to_string(tm_format), t.ztime)); - return fmt::formatter::format((const std::tm&) t, ctx); + return format_to(ctx.out(), "{}", date::format(t.locale, fmt::to_string(tm_format), t.ztime)); } }; From c4cc7ae396b8f040522ec3fcf76b9f9fbd1c65d4 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 24 Jan 2022 09:22:47 +0100 Subject: [PATCH 10/22] Update client.cpp --- src/modules/sway/ipc/client.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/modules/sway/ipc/client.cpp b/src/modules/sway/ipc/client.cpp index ea1a3c5..58aed60 100644 --- a/src/modules/sway/ipc/client.cpp +++ b/src/modules/sway/ipc/client.cpp @@ -14,15 +14,12 @@ Ipc::~Ipc() { if (fd_ > 0) { // To fail the IPC header - if (write(fd_, "close-sway-ipc", 14) == -1) { - //std::runtime_error("Couldn't close Sway IPC through fd"); - } + write(fd_, "close-sway-ipc", 14); close(fd_); fd_ = -1; } if (fd_event_ > 0) { - if (write(fd_event_, "close-sway-ipc", 14) == -1) { - } + write(fd_event_, "close-sway-ipc", 14); close(fd_event_); fd_event_ = -1; } From f4f1267a717fec82bdd97d83101d3e5f9b8b9bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oto=20=C5=A0=C5=A5=C3=A1va?= Date: Tue, 25 Jan 2022 20:03:19 +0100 Subject: [PATCH 11/22] sway/language: fix segmentation fault for layouts not found in XKBContext --- src/modules/sway/language.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/sway/language.cpp b/src/modules/sway/language.cpp index 73a64c3..f64c7d0 100644 --- a/src/modules/sway/language.cpp +++ b/src/modules/sway/language.cpp @@ -154,7 +154,10 @@ auto Language::init_layouts_map(const std::vector& used_layouts) -> std::map short_name_to_number_map; for (const auto& used_layout_name : used_layouts) { - auto used_layout = &layouts_map_.find(used_layout_name)->second; + auto found = layouts_map_.find(used_layout_name); + if (found == layouts_map_.end()) + continue; + auto used_layout = &found->second; auto layouts_with_same_name_list = found_by_short_names[used_layout->short_name]; if (layouts_with_same_name_list.size() < 2) { continue; From 32d42749f9b4c44fb0b8b46b2236884c4198b594 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Fri, 28 Jan 2022 18:42:52 +0100 Subject: [PATCH 12/22] use pack_end instead of pack_start --- src/modules/sni/tray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/sni/tray.cpp b/src/modules/sni/tray.cpp index c32c0d6..4606857 100644 --- a/src/modules/sni/tray.cpp +++ b/src/modules/sni/tray.cpp @@ -25,7 +25,7 @@ Tray::Tray(const std::string& id, const Bar& bar, const Json::Value& config) } void Tray::onAdd(std::unique_ptr& item) { - box_.pack_start(item->event_box); + box_.pack_end(item->event_box); dp.emit(); } From 941cf47693ad9ea48054634f30684691c352247f Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Fri, 28 Jan 2022 19:14:46 +0100 Subject: [PATCH 13/22] Add config option "reverse-direction" --- man/waybar-tray.5.scd | 4 ++++ src/modules/sni/tray.cpp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/man/waybar-tray.5.scd b/man/waybar-tray.5.scd index c664594..bfd1f29 100644 --- a/man/waybar-tray.5.scd +++ b/man/waybar-tray.5.scd @@ -29,6 +29,10 @@ Addressed by *tray* typeof: integer ++ Defines the spacing between the tray icons. +*reverse-direction*: ++ + typeof: bool ++ + Defines if new app icons should be added in a reverse order + *on-update*: ++ typeof: string ++ Command to execute when the module is updated. diff --git a/src/modules/sni/tray.cpp b/src/modules/sni/tray.cpp index 4606857..94120be 100644 --- a/src/modules/sni/tray.cpp +++ b/src/modules/sni/tray.cpp @@ -25,7 +25,11 @@ Tray::Tray(const std::string& id, const Bar& bar, const Json::Value& config) } void Tray::onAdd(std::unique_ptr& item) { - box_.pack_end(item->event_box); + if (config_["reverse-direction"].isBool() && config_["reverse-direction"].asBool()) { + box_.pack_end(item->event_box); + } else { + box_.pack_start(item->event_box); + } dp.emit(); } From a0ee9e7fc1ec8a381926f824c072ad7cbb29552c Mon Sep 17 00:00:00 2001 From: snehrbass <62710600+snehrbass@users.noreply.github.com> Date: Sat, 29 Jan 2022 14:19:53 -0500 Subject: [PATCH 14/22] Fix Typo in Example for sway/mode --- man/waybar-sway-mode.5.scd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/waybar-sway-mode.5.scd b/man/waybar-sway-mode.5.scd index b8b59cd..29eed4f 100644 --- a/man/waybar-sway-mode.5.scd +++ b/man/waybar-sway-mode.5.scd @@ -69,7 +69,7 @@ Addressed by *sway/mode* # EXAMPLES ``` -"sway/window": { +"sway/mode": { "format": " {}", "max-length": 50 } From 895bc878f8773cb974bdc73f2ef531f4755e416b Mon Sep 17 00:00:00 2001 From: Evyatar Stalinsky Date: Tue, 1 Feb 2022 22:42:03 +0200 Subject: [PATCH 15/22] Properly initialize distance_scrolled members. When they were uninitialized it caused getScrollDir() to incorrectly return SCROLL_DIR::NONE in some circumstances --- src/AModule.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/AModule.cpp b/src/AModule.cpp index 7da942e..0e0f00e 100644 --- a/src/AModule.cpp +++ b/src/AModule.cpp @@ -6,7 +6,9 @@ namespace waybar { AModule::AModule(const Json::Value& config, const std::string& name, const std::string& id, bool enable_click, bool enable_scroll) - : name_(std::move(name)), config_(std::move(config)) { + : name_(std::move(name)), config_(std::move(config)) + , distance_scrolled_y_(0.0) + , distance_scrolled_x_(0.0) { // configure events' user commands if (config_["on-click"].isString() || config_["on-click-middle"].isString() || config_["on-click-backward"].isString() || config_["on-click-forward"].isString() || From c80cc873afc0251937980d89c4f7fb2268a43bb0 Mon Sep 17 00:00:00 2001 From: snehrbass <62710600+snehrbass@users.noreply.github.com> Date: Wed, 2 Feb 2022 00:01:18 -0500 Subject: [PATCH 16/22] Update spotify example to work on copy paste --- man/waybar-custom.5.scd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man/waybar-custom.5.scd b/man/waybar-custom.5.scd index 8f9dcfa..3d30859 100644 --- a/man/waybar-custom.5.scd +++ b/man/waybar-custom.5.scd @@ -151,7 +151,8 @@ $text\\n$tooltip\\n$class* "max-length": 40, "interval": 30, // Remove this if your script is endless and write in loop "exec": "$HOME/.config/waybar/mediaplayer.sh 2> /dev/null", // Script in resources folder - "exec-if": "pgrep spotify" + "exec-if": "pgrep spotify", + "return-type": "json" } ``` From 6be741afc91c737b973533be6abbb366a7d3adf5 Mon Sep 17 00:00:00 2001 From: gemmelos <73130646+gemmelos@users.noreply.github.com> Date: Wed, 2 Feb 2022 12:41:06 +0100 Subject: [PATCH 17/22] Fix disabled tooltip on clock module Seems like the tooltip text should only be set if both `if (tooltipEnabled())` and `if (config_["tooltip-format"].isString())` passes. --- src/modules/clock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/clock.cpp b/src/modules/clock.cpp index 6aa5afb..acb90b7 100644 --- a/src/modules/clock.cpp +++ b/src/modules/clock.cpp @@ -113,10 +113,10 @@ auto waybar::modules::Clock::update() -> void { } auto tooltip_format = config_["tooltip-format"].asString(); text = fmt::format(tooltip_format, wtime, fmt::arg(kCalendarPlaceholder.c_str(), calendar_lines)); + label_.set_tooltip_markup(text); } } - label_.set_tooltip_markup(text); // Call parent update ALabel::update(); } From 6c188455a4ca75fbb11cd07de0feb19cc5d1341a Mon Sep 17 00:00:00 2001 From: gemmelos <73130646+gemmelos@users.noreply.github.com> Date: Sat, 5 Feb 2022 19:05:50 +0100 Subject: [PATCH 18/22] Update man page clock module - tooltip Add tooltip documentation to the clock man page now that this is works. --- man/waybar-clock.5.scd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/waybar-clock.5.scd b/man/waybar-clock.5.scd index 2c901d2..265e739 100644 --- a/man/waybar-clock.5.scd +++ b/man/waybar-clock.5.scd @@ -86,6 +86,11 @@ The *clock* module displays the current date and time. typeof: double ++ Threshold to be used when scrolling. +*tooltip*: ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + View all valid format options in *strftime(3)*. # FORMAT REPLACEMENTS From d4da04a7507177f702aee7c5e58daa6788d00fd5 Mon Sep 17 00:00:00 2001 From: Alex Maystrenko Date: Sat, 5 Feb 2022 21:19:55 +0100 Subject: [PATCH 19/22] move Glib ustring format helper to utils this formatter is useful for other modules which want to print Glib exceptions messages --- include/util/format.hpp | 11 +++++++++++ src/modules/sni/item.cpp | 8 +------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/include/util/format.hpp b/include/util/format.hpp index 543a100..48f0f51 100644 --- a/include/util/format.hpp +++ b/include/util/format.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include class pow_format { public: @@ -84,5 +85,15 @@ namespace fmt { ); } }; + + + // Glib ustirng support + template <> + struct formatter : formatter { + template + auto format(const Glib::ustring& value, FormatContext& ctx) { + return formatter::format(value, ctx); + } + }; } diff --git a/src/modules/sni/item.cpp b/src/modules/sni/item.cpp index b504c8d..74987ca 100644 --- a/src/modules/sni/item.cpp +++ b/src/modules/sni/item.cpp @@ -8,13 +8,7 @@ #include #include -template <> -struct fmt::formatter : formatter { - template - auto format(const Glib::ustring& value, FormatContext& ctx) { - return formatter::format(value, ctx); - } -}; +#include "util/format.hpp" template <> struct fmt::formatter : formatter { From 1a93a6cfa593093868ac684831e0072b3dacc46a Mon Sep 17 00:00:00 2001 From: Dorian Rudolph Date: Wed, 9 Feb 2022 14:20:09 +0100 Subject: [PATCH 20/22] fix #1431: audio output does not update on unplug --- src/modules/pulseaudio.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/pulseaudio.cpp b/src/modules/pulseaudio.cpp index 3c32060..b1f7830 100644 --- a/src/modules/pulseaudio.cpp +++ b/src/modules/pulseaudio.cpp @@ -54,7 +54,9 @@ void waybar::modules::Pulseaudio::contextStateCb(pa_context *c, void *data) { c, static_cast(static_cast(PA_SUBSCRIPTION_MASK_SERVER) | static_cast(PA_SUBSCRIPTION_MASK_SINK) | - static_cast(PA_SUBSCRIPTION_MASK_SOURCE)), + static_cast(PA_SUBSCRIPTION_MASK_SINK_INPUT) | + static_cast(PA_SUBSCRIPTION_MASK_SOURCE) | + static_cast(PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT)), nullptr, nullptr); break; @@ -121,8 +123,12 @@ void waybar::modules::Pulseaudio::subscribeCb(pa_context * conte pa_context_get_server_info(context, serverInfoCb, data); } else if (facility == PA_SUBSCRIPTION_EVENT_SINK) { pa_context_get_sink_info_by_index(context, idx, sinkInfoCb, data); + } else if (facility == PA_SUBSCRIPTION_EVENT_SINK_INPUT) { + pa_context_get_sink_info_list(context, sinkInfoCb, data); } else if (facility == PA_SUBSCRIPTION_EVENT_SOURCE) { pa_context_get_source_info_by_index(context, idx, sourceInfoCb, data); + } else if (facility == PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT) { + pa_context_get_source_info_list(context, sourceInfoCb, data); } } @@ -279,7 +285,7 @@ auto waybar::modules::Pulseaudio::update() -> void { fmt::arg("source_desc", source_desc_), fmt::arg("icon", getIcon(volume_, getPulseIcon())))); getState(volume_); - + if (tooltipEnabled()) { if (tooltip_format.empty() && config_["tooltip-format"].isString()) { tooltip_format = config_["tooltip-format"].asString(); From fc818dd7941ac6f4fe57784a1d2f073caf801347 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sun, 13 Feb 2022 11:12:52 +0000 Subject: [PATCH 21/22] ci: update freebsd-vm to 0.1.6 --- .github/workflows/freebsd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index d5064fe..1e420fd 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Test in FreeBSD VM - uses: vmactions/freebsd-vm@v0.1.5 # aka FreeBSD 13.0 + uses: vmactions/freebsd-vm@v0.1.6 # aka FreeBSD 13.0 with: mem: 2048 usesh: true From 851508df5e5d54607ef85f47021fa13b9ae8c142 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sun, 13 Feb 2022 11:14:01 +0000 Subject: [PATCH 22/22] ci: explicitly install wayland-protocols on FreeBSD meson.build:86:0: ERROR: Dependency "wayland-protocols" not found, tried pkgconfig --- .github/workflows/freebsd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 1e420fd..f3c107a 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -21,7 +21,7 @@ jobs: pkg install -y git # subprojects/date pkg install -y catch evdev-proto gtk-layer-shell gtkmm30 jsoncpp \ libdbusmenu libevdev libfmt libmpdclient libudev-devd meson \ - pkgconf pulseaudio scdoc sndio spdlog + pkgconf pulseaudio scdoc sndio spdlog wayland-protocols run: | meson build -Dman-pages=enabled ninja -C build