Skip to content

Commit dda5b73

Browse files
committed
fix(cava): default data_format to ascii for correct bar scaling
data_format was changed from always "ascii" to user-configurable, but without a default. This caused cava to use "binary", calculating height as 65535 instead of ascii_range, making bars always peak.
1 parent 0648454 commit dda5b73

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/modules/cava/cava_backend.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ void waybar::modules::cava::CavaBackend::loadConfig() {
186186
if (config_["data_format"].isString()) {
187187
if (prm_.data_format) free(prm_.data_format);
188188
prm_.data_format = strdup(config_["data_format"].asString().c_str());
189+
} else {
190+
// Default to ascii for format-icons output
191+
if (prm_.data_format) free(prm_.data_format);
192+
prm_.data_format = strdup("ascii");
189193
}
190194
if (config_["raw_target"].isString()) {
191195
if (prm_.raw_target) free(prm_.raw_target);

0 commit comments

Comments
 (0)