pulseaudio: track only the default sink and source

When you have multiple sinks (resp. sources), the module used to display
the state of the most recently changed one. This changes remembers the
default sink name, and only records changes to that one.
This commit is contained in:
Guillaume Maudoux
2020-02-24 11:30:35 +01:00
parent 2d8dc83480
commit 190b2dd922
2 changed files with 17 additions and 11 deletions

View File

@ -37,12 +37,14 @@ class Pulseaudio : public ALabel {
std::string form_factor_;
std::string desc_;
std::string monitor_;
std::string default_sink_name_;
// SOURCE
uint32_t source_idx_{0};
uint16_t source_volume_;
bool source_muted_;
std::string source_port_name_;
std::string source_desc_;
std::string default_source_name_;
};
} // namespace waybar::modules