Commit Graph

6 Commits

Author SHA1 Message Date
Viktar Lukashonak ed31b20c26
Merge branch 'master' into YearCalendar
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-01-23 18:42:32 +03:00
Sasha Moak 4e8ccf36b5 fix(wireplumber): waybar crashes when default node changes
In order to fix the issue, the default node name is cached rather than
the default node id. This is due to ids being unstable. So now when the
object manager is installed (ie ready), the default node name is
retrieved and stored for later.

Now when the mixer changed signal is emitted, the id of the changed node
is used to get the node from the object manager. The nodes name is
grabbed off that node and compared against the default node name, if
they match the volume is updated. Some safeguarding has been added such
that if the node cannot be found off the object manager, it's ignored.

Additionally, the "changed" signal on the default nodes api is now
utilized to update the default node name if it has changed. This way if
the default node changes, the module will be updated with the correct
volume and node.nick.

This adds additional debug logging for helping diagnose wireplumber
issues.

This also adds the wireplumber man page entry to the main waybar
supported section.
2023-01-16 10:29:35 -08:00
Sasha Moak 60fa5e9f67 fix: wireplumber module when used with a bluetooth device
This fixes #1811 by falling back to `node.description` if `node.nick` is
not available. This can happen for bluetooth devices that do not have a
`node.nick`.
2022-11-26 11:35:45 -08:00
Sasha Moak 3730793197 feat: add icon support to the wireplumber module
Adds basic icon support for the wireplumber module.

This can be achieved by using `{icon}` in the `format` config and
pairing it with the `format-icons` config as well.

Example:

```
"wireplumber": {
    "format": "{volume}% {icon}",
    "format-icons": ["", "", ""]
}
```
2022-11-26 10:02:16 -08:00
Simon Plakolb 5e9bbe5c76 modules: Revert button to label 2022-11-24 13:08:16 +01:00
Sasha Moak c2f98d07ef feat: wireplumber support
Adds basic support for showing volume via wireplumber. Allows specifying
the node-id or falling back to the default Audio/Sink node id if node-id
is not set. If tooltip on hover is enabled, will show `{node_name}` by
default otherwise `tooltip-format`.

Format replacements:

`{volume}` - Volume in percentage
`{node_name}` - The node's nickname (`node.nick` property)
2022-11-16 23:23:07 -08:00