fixed clang format for language.cpp
This commit is contained in:
@@ -10,8 +10,7 @@
|
|||||||
namespace waybar::modules::hyprland {
|
namespace waybar::modules::hyprland {
|
||||||
|
|
||||||
Language::Language(const std::string& id, const Bar& bar, const Json::Value& config)
|
Language::Language(const std::string& id, const Bar& bar, const Json::Value& config)
|
||||||
: ALabel(config, "language", id, "{}", 0, true),
|
: ALabel(config, "language", id, "{}", 0, true), bar_(bar) {
|
||||||
bar_(bar) {
|
|
||||||
modulesReady = true;
|
modulesReady = true;
|
||||||
|
|
||||||
if (!gIPC) {
|
if (!gIPC) {
|
||||||
@@ -69,20 +68,19 @@ auto Language::update() -> void {
|
|||||||
const auto propName = "tooltip-format-" + layout_.short_description;
|
const auto propName = "tooltip-format-" + layout_.short_description;
|
||||||
tooltipContent = fmt::format(fmt::runtime(tooltip_format), config_[propName].asString());
|
tooltipContent = fmt::format(fmt::runtime(tooltip_format), config_[propName].asString());
|
||||||
} else {
|
} else {
|
||||||
tooltipContent = trim(fmt::format(fmt::runtime(tooltip_format), fmt::arg("long", layout_.full_name),
|
tooltipContent =
|
||||||
fmt::arg("short", layout_.short_name),
|
trim(fmt::format(fmt::runtime(tooltip_format), fmt::arg("long", layout_.full_name),
|
||||||
fmt::arg("shortDescription", layout_.short_description),
|
fmt::arg("short", layout_.short_name),
|
||||||
fmt::arg("variant", layout_.variant)));
|
fmt::arg("shortDescription", layout_.short_description),
|
||||||
|
fmt::arg("variant", layout_.variant)));
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// if no tooltip format is provided, use the same text as the module
|
// if no tooltip format is provided, use the same text as the module
|
||||||
tooltipContent = layoutName;
|
tooltipContent = layoutName;
|
||||||
}
|
}
|
||||||
spdlog::debug("hyprland language formatted tooltip content {}", tooltipContent);
|
spdlog::debug("hyprland language formatted tooltip content {}", tooltipContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!format_.empty()) {
|
if (!format_.empty()) {
|
||||||
label_.show();
|
label_.show();
|
||||||
label_.set_markup(layoutName);
|
label_.set_markup(layoutName);
|
||||||
|
|||||||
Reference in New Issue
Block a user