Merge pull request #2068 from TheRealLorenz/master

This commit is contained in:
Alex
2023-04-03 09:44:04 +02:00
committed by GitHub
6 changed files with 16 additions and 16 deletions

View File

@ -8,7 +8,7 @@
#include "modules/hyprland/backend.hpp"
#include "util/command.hpp"
#include "util/json.hpp"
#include "util/rewrite_title.hpp"
#include "util/rewrite_string.hpp"
namespace waybar::modules::hyprland {
@ -41,7 +41,7 @@ auto Window::update() -> void {
if (!format_.empty()) {
label_.show();
label_.set_markup(fmt::format(fmt::runtime(format_),
waybar::util::rewriteTitle(lastView, config_["rewrite"])));
waybar::util::rewriteString(lastView, config_["rewrite"])));
} else {
label_.hide();
}

View File

@ -12,7 +12,7 @@
#include <regex>
#include <string>
#include "util/rewrite_title.hpp"
#include "util/rewrite_string.hpp"
namespace waybar::modules::sway {
@ -204,10 +204,10 @@ auto Window::update() -> void {
old_app_id_ = app_id_;
}
label_.set_markup(
fmt::format(fmt::runtime(format_),
fmt::arg("title", waybar::util::rewriteTitle(window_, config_["rewrite"])),
fmt::arg("app_id", app_id_), fmt::arg("shell", shell_)));
label_.set_markup(waybar::util::rewriteString(
fmt::format(fmt::runtime(format_), fmt::arg("title", window_), fmt::arg("app_id", app_id_),
fmt::arg("shell", shell_)),
config_["rewrite"]));
if (tooltipEnabled()) {
label_.set_tooltip_text(window_);
}