Implemented "only-physical" parameter in the wireplumber module.

It makes it find the first node that has adevice.id linked to the
default output if the default output doesn't have it (i.e. it is a
virtual output).

Useful if you want to control (and see) the volume of the actual output
and not the effect sink.

May need some polishing and/or style fixing, but it works.
This commit is contained in:
PickNicko13
2025-12-21 23:46:15 +01:00
parent 97eb60677e
commit 5c9a1b08d9
2 changed files with 169 additions and 13 deletions
+6
View File
@@ -36,6 +36,10 @@ class Wireplumber : public ALabel {
static std::list<waybar::modules::Wireplumber*> modules;
uint32_t resolvePhysicalSink(uint32_t start_id);
uint32_t findPlaybackNodeId(const gchar* description);
static uint32_t get_linked_sink_id(WpObjectManager* om, uint32_t from_node_id, const gchar* media_class);
WpCore* wp_core_;
GPtrArray* apis_;
WpObjectManager* om_;
@@ -54,6 +58,8 @@ class Wireplumber : public ALabel {
bool source_muted_;
double source_volume_;
gchar* default_source_name_;
bool only_physical_;
bool resolved_physical_;
};
} // namespace waybar::modules