meow lucy should commit more often xd
This commit is contained in:
parent
e865cd7c8f
commit
e986986e79
9 changed files with 124 additions and 212 deletions
22
modules/desktop/waybar-wireplumber-db.patch
Normal file
22
modules/desktop/waybar-wireplumber-db.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/src/modules/wireplumber.cpp b/src/modules/wireplumber.cpp
|
||||
index a43ad29b..d04edd18 100644
|
||||
--- a/src/modules/wireplumber.cpp
|
||||
+++ b/src/modules/wireplumber.cpp
|
||||
@@ -436,7 +437,7 @@ auto waybar::modules::Wireplumber::update() -> void {
|
||||
label_.get_style_context()->remove_class("source-muted");
|
||||
}
|
||||
|
||||
- int vol = round(volume_ * 100.0);
|
||||
+ double vol = 20 * std::log10(volume_); // % to dB
|
||||
int source_vol = round(source_volume_ * 100.0);
|
||||
|
||||
// Get the state and apply state-specific format if available
|
||||
@@ -450,7 +451,7 @@ auto waybar::modules::Wireplumber::update() -> void {
|
||||
}
|
||||
|
||||
// Prepare source format string (similar to PulseAudio)
|
||||
- std::string format_source = "{volume}%";
|
||||
+ std::string format_source = "{volume}dB";
|
||||
if (source_muted_) {
|
||||
if (config_["format-source-muted"].isString()) {
|
||||
format_source = config_["format-source-muted"].asString();
|
||||
Loading…
Add table
Add a link
Reference in a new issue