split waybar into multiple files

This commit is contained in:
Lucy Hochkamp 2025-10-06 21:29:04 +02:00
parent 53c7532351
commit 7cff7f09c3
No known key found for this signature in database
29 changed files with 953 additions and 617 deletions

View file

@ -1,22 +0,0 @@
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 = 60 * 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();