fix: lint

This commit is contained in:
Alex
2025-08-08 08:42:17 +02:00
parent b0983e9c37
commit 79c30e77a7
3 changed files with 11 additions and 13 deletions

View File

@ -185,8 +185,7 @@ void waybar::modules::MPD::setLabel() {
fmt::arg("songPosition", song_pos), fmt::arg("queueLength", queue_length), fmt::arg("songPosition", song_pos), fmt::arg("queueLength", queue_length),
fmt::arg("stateIcon", stateIcon), fmt::arg("consumeIcon", consumeIcon), fmt::arg("stateIcon", stateIcon), fmt::arg("consumeIcon", consumeIcon),
fmt::arg("randomIcon", randomIcon), fmt::arg("repeatIcon", repeatIcon), fmt::arg("randomIcon", randomIcon), fmt::arg("repeatIcon", repeatIcon),
fmt::arg("singleIcon", singleIcon), fmt::arg("filename", filename), fmt::arg("singleIcon", singleIcon), fmt::arg("filename", filename), fmt::arg("uri", uri));
fmt::arg("uri", uri));
if (text.empty()) { if (text.empty()) {
label_.hide(); label_.hide();
} else { } else {
@ -202,16 +201,15 @@ void waybar::modules::MPD::setLabel() {
tooltip_format = config_["tooltip-format"].isString() ? config_["tooltip-format"].asString() tooltip_format = config_["tooltip-format"].isString() ? config_["tooltip-format"].asString()
: "MPD (connected)"; : "MPD (connected)";
try { try {
auto tooltip_text = auto tooltip_text = fmt::format(
fmt::format(fmt::runtime(tooltip_format), fmt::arg("artist", artist.raw()), fmt::runtime(tooltip_format), fmt::arg("artist", artist.raw()),
fmt::arg("albumArtist", album_artist.raw()), fmt::arg("album", album.raw()), fmt::arg("albumArtist", album_artist.raw()), fmt::arg("album", album.raw()),
fmt::arg("title", title.raw()), fmt::arg("date", date), fmt::arg("title", title.raw()), fmt::arg("date", date), fmt::arg("volume", volume),
fmt::arg("volume", volume), fmt::arg("elapsedTime", elapsedTime), fmt::arg("elapsedTime", elapsedTime), fmt::arg("totalTime", totalTime),
fmt::arg("totalTime", totalTime), fmt::arg("songPosition", song_pos), fmt::arg("songPosition", song_pos), fmt::arg("queueLength", queue_length),
fmt::arg("queueLength", queue_length), fmt::arg("stateIcon", stateIcon), fmt::arg("stateIcon", stateIcon), fmt::arg("consumeIcon", consumeIcon),
fmt::arg("consumeIcon", consumeIcon), fmt::arg("randomIcon", randomIcon), fmt::arg("randomIcon", randomIcon), fmt::arg("repeatIcon", repeatIcon),
fmt::arg("repeatIcon", repeatIcon), fmt::arg("singleIcon", singleIcon), fmt::arg("singleIcon", singleIcon), fmt::arg("filename", filename), fmt::arg("uri", uri));
fmt::arg("filename", filename), fmt::arg("uri", uri));
label_.set_tooltip_text(tooltip_text); label_.set_tooltip_text(tooltip_text);
} catch (fmt::format_error const& e) { } catch (fmt::format_error const& e) {
spdlog::warn("mpd: format error (tooltip): {}", e.what()); spdlog::warn("mpd: format error (tooltip): {}", e.what());

View File

@ -152,7 +152,6 @@ void Layout::handle_name(const char *name) {
label_.get_style_context()->add_class(name); label_.get_style_context()->add_class(name);
label_.set_markup(fmt::format(fmt::runtime(format_), Glib::Markup::escape_text(name).raw())); label_.set_markup(fmt::format(fmt::runtime(format_), Glib::Markup::escape_text(name).raw()));
label_.show(); label_.show();
} }
name_ = name; name_ = name;
ALabel::update(); ALabel::update();

View File

@ -3,6 +3,7 @@
#include <spdlog/spdlog.h> #include <spdlog/spdlog.h>
#include <algorithm> #include <algorithm>
#include "modules/sni/icon_manager.hpp" #include "modules/sni/icon_manager.hpp"
namespace waybar::modules::SNI { namespace waybar::modules::SNI {