[modules/pulseaudio] fix bluetooth class for PipeWire

apparently, pipewire-pulse slightly changed the naming of the sink.
pull/1081/head
David96 2021-04-25 11:19:35 +02:00
parent 66d8035ed1
commit 2213380dc0
1 changed files with 2 additions and 1 deletions

View File

@ -210,7 +210,8 @@ auto waybar::modules::Pulseaudio::update() -> void {
std::string tooltip_format; std::string tooltip_format;
if (!alt_) { if (!alt_) {
std::string format_name = "format"; std::string format_name = "format";
if (monitor_.find("a2dp_sink") != std::string::npos) { if (monitor_.find("a2dp_sink") != std::string::npos || // PulseAudio
monitor_.find("a2dp-sink") != std::string::npos) { // PipeWire
format_name = format_name + "-bluetooth"; format_name = format_name + "-bluetooth";
label_.get_style_context()->add_class("bluetooth"); label_.get_style_context()->add_class("bluetooth");
} else { } else {