wireplumber: add more volume formats

- Add the possibility to show the volume in linear, cubic, db, and
  cubic percent (default for backward compatibility).
- Add the ability to change the scale for the scrolling action.
- Make the minimal step flexible to fit any scale.
This commit is contained in:
Marc Bornand
2025-08-21 13:48:00 +02:00
parent 41de8964f1
commit aaffebed4c
2 changed files with 88 additions and 18 deletions
+23 -2
View File
@@ -63,6 +63,11 @@ The *wireplumber* module displays the current volume reported by WirePlumber.
default: 1.0 ++
The speed at which to change the volume when scrolling.
*scroll-scale*: ++
typeof: string ++
default: cubic_percent
The scale to use for the scrolling volume change. Options are 'linear', 'db', 'cubic', and 'cubic_percent'.
*on-click*: ++
typeof: string ++
Command to execute when clicked on the module.
@@ -107,7 +112,13 @@ The *wireplumber* module displays the current volume reported by WirePlumber.
# FORMAT REPLACEMENTS
*{volume}*: Volume in percentage.
*{volume}*: Volume in percentage, cubic scale as integer.
*{volume_linear}*: Volume in linear scale as float.
*{volume_cubic}*: Volume in cubic scale as float.
*{volume_db}*: Volume in decibel scale as float.
*{node_name}*: The node's nickname as reported by WirePlumber (*node.nick* property)
@@ -123,7 +134,7 @@ The *wireplumber* module displays the current volume reported by WirePlumber.
}
```
## Separate Sink and Source Widgets
## Separate Sink and Source Widgets
```
"wireplumber#sink": {
@@ -143,6 +154,16 @@ The *wireplumber* module displays the current volume reported by WirePlumber.
}
```
## Use a Different Scale
```
"wireplumber": {
"format": "{volume_db:.2f}dB",
"scroll-scale": "db",
"scroll-step": 2.5
}
```
# STYLE
- *#wireplumber*