mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #309 from dlasky/btaudio
fix(btformat): fixes an issue where btformat was not detected
This commit is contained in:
commit
10a17187a1
@ -33,6 +33,7 @@ class Pulseaudio : public ALabel {
|
||||
bool muted_;
|
||||
std::string port_name_;
|
||||
std::string desc_;
|
||||
std::string monitor_;
|
||||
bool scrolling_;
|
||||
};
|
||||
|
||||
|
@ -148,6 +148,7 @@ void waybar::modules::Pulseaudio::sinkInfoCb(pa_context * /*context*/, const pa_
|
||||
pa->volume_ = std::round(volume * 100.0F);
|
||||
pa->muted_ = i->mute != 0;
|
||||
pa->desc_ = i->description;
|
||||
pa->monitor_ = i->monitor_source_name;
|
||||
pa->port_name_ = i->active_port != nullptr ? i->active_port->name : "Unknown";
|
||||
pa->dp.emit();
|
||||
}
|
||||
@ -192,7 +193,7 @@ auto waybar::modules::Pulseaudio::update() -> void {
|
||||
label_.get_style_context()->add_class("muted");
|
||||
} else {
|
||||
label_.get_style_context()->remove_class("muted");
|
||||
if (port_name_.find("a2dp_sink") != std::string::npos) {
|
||||
if (monitor_.find("a2dp_sink") != std::string::npos) {
|
||||
format =
|
||||
config_["format-bluetooth"].isString() ? config_["format-bluetooth"].asString() : format;
|
||||
label_.get_style_context()->add_class("bluetooth");
|
||||
|
Loading…
Reference in New Issue
Block a user