meow lucy should commit more often xd

This commit is contained in:
Lucy Hochkamp 2025-09-16 09:54:20 +02:00
parent e865cd7c8f
commit e986986e79
No known key found for this signature in database
9 changed files with 124 additions and 212 deletions

View 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();