Merge branch 'master' into feature/module-brightness

This commit is contained in:
Alex
2019-02-21 15:29:17 +01:00
committed by GitHub
3 changed files with 9 additions and 6 deletions

View File

@ -202,13 +202,15 @@ auto waybar::modules::Pulseaudio::update() -> void
format =
config_["format-muted"].isString() ? config_["format-muted"].asString() : format;
label_.get_style_context()->add_class("muted");
} else if (port_name_.find("a2dp_sink") != std::string::npos) {
format = config_["format-bluetooth"].isString()
? config_["format-bluetooth"].asString() : format;
label_.get_style_context()->add_class("bluetooth");
} else {
label_.get_style_context()->remove_class("muted");
label_.get_style_context()->remove_class("bluetooth");
if (port_name_.find("a2dp_sink") != std::string::npos) {
format = config_["format-bluetooth"].isString()
? config_["format-bluetooth"].asString() : format;
label_.get_style_context()->add_class("bluetooth");
} else {
label_.get_style_context()->remove_class("bluetooth");
}
}
label_.set_markup(
fmt::format(format, fmt::arg("volume", volume_),