Update pulseaudio.cpp

This commit is contained in:
Alex 2020-02-16 21:48:22 +00:00 committed by GitHub
parent 82d0c87934
commit 543589a97b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,6 +200,7 @@ const std::string waybar::modules::Pulseaudio::getPortIcon() const {
auto waybar::modules::Pulseaudio::update() -> void {
auto format = format_;
if (!alt_) {
std::string format_name = "format";
if (monitor_.find("a2dp_sink") != std::string::npos) {
format_name = format_name + "-bluetooth";
@ -215,6 +216,7 @@ auto waybar::modules::Pulseaudio::update() -> void {
}
format =
config_[format_name].isString() ? config_[format_name].asString() : format;
}
// TODO: find a better way to split source/sink
std::string format_source = "{volume}%";
if (source_muted_ && config_["format-source-muted"].isString()) {