Skip to content

Commit

Permalink
refactor(pulseaudio): fallback to default muted format
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexays committed Mar 25, 2020
1 parent c302116 commit 9acf558
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/pulseaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ auto waybar::modules::Pulseaudio::update() -> void {
} else {
label_.get_style_context()->remove_class("bluetooth");
}
if (muted_ ) {
if (muted_) {
// Check muted bluetooth format exist, otherwise fallback to default muted format
if (format_name != "format" && !config_[format_name + "-muted"].isString()) {
format_name = "format";
}
format_name = format_name + "-muted";
label_.get_style_context()->add_class("muted");
} else {
Expand Down

0 comments on commit 9acf558

Please sign in to comment.