fix formatting issues

This commit is contained in:
Prokhor40 2022-12-02 19:32:03 +03:00
parent b74f3c7aaa
commit ce8c13788a
3 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@ void waybar::modules::MPD::setLabel() {
auto format = config_["format-disconnected"].isString()
? config_["format-disconnected"].asString()
: "disconnected";
if(format.empty()) {
if (format.empty()) {
label_.set_markup(format);
label_.show();
} else {
@ -183,7 +183,7 @@ void waybar::modules::MPD::setLabel() {
fmt::arg("consumeIcon", consumeIcon), fmt::arg("randomIcon", randomIcon),
fmt::arg("repeatIcon", repeatIcon), fmt::arg("singleIcon", singleIcon),
fmt::arg("filename", filename));
if(text.empty()) {
if (text.empty()) {
label_.hide();
} else {
label_.show();

View File

@ -299,7 +299,7 @@ auto waybar::modules::Pulseaudio::update() -> void {
format, fmt::arg("desc", desc_), fmt::arg("volume", volume_),
fmt::arg("format_source", format_source), fmt::arg("source_volume", source_volume_),
fmt::arg("source_desc", source_desc_), fmt::arg("icon", getIcon(volume_, getPulseIcon())));
if(text.empty()) {
if (text.empty()) {
label_.hide();
} else {
label_.set_markup(text);

View File

@ -111,7 +111,7 @@ auto Sndio::update() -> void {
}
auto text = fmt::format(format, fmt::arg("volume", vol), fmt::arg("raw_value", volume_));
if(text.empty()) {
if (text.empty()) {
label_.hide();
} else {
label_.set_markup(text);