diff --git a/CHANGELOG.md b/CHANGELOG.md index 2326f4ae..1c8884d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ * Tag editor now only writes to files with modified tags. * Column view can now display full filepaths. * Updated the list of working lyrics fetchers. +* Add `visualizer_spectrum_smooth_look_legacy_chars` option (enabled by default) + for potentially improved bottom part of the spectrum visualizer in terminals + with transparent background. # ncmpcpp-0.9.2 (2021-01-24) * Revert suppression of output of all external commands as that makes e.g album diff --git a/doc/config b/doc/config index 4bf1abe0..327a0678 100644 --- a/doc/config +++ b/doc/config @@ -125,14 +125,13 @@ # #visualizer_spectrum_smooth_look = yes # -## Use unicode block characters from "symbols for legacy computing", this +## Use unicode block characters from "symbols for legacy computing". This ## improves the smooth look on transparent terminals by using special unicode ## chars instead of reversing the background and foreground color on the bottom -## edge of the spectrum. This may lead to a glitchy mess on the bottom edge of -## the spectrum, this can eighter be fixed by changing the font or disabeling -## this. +## edge of the spectrum. If it leads to a garbled output on the bottom edge of +## the spectrum, you can either change the font or disable this option. # -#visualizer_spectrum_use_legacy_chars = yes +#visualizer_spectrum_smooth_look_legacy_chars = yes # ## A value between 1 and 5 inclusive. Specifying a larger value makes the ## visualizer look at a larger slice of time, which results in less jumpy diff --git a/doc/ncmpcpp.1 b/doc/ncmpcpp.1 index e4ec577d..075f68ae 100644 --- a/doc/ncmpcpp.1 +++ b/doc/ncmpcpp.1 @@ -114,8 +114,12 @@ Automatically scale visualizer size. .B visualizer_spectrum_smooth_look = yes/no For spectrum visualizer, use unicode block characters for a smoother, more continuous look. This will override the visualizer_look option. With transparent terminals and visualizer_in_stereo set, artifacts may be visible on the bottom half of the visualization. .TP -.B visualizer_spectrum_use_legacy_chars = yes/no -Use unicode block characters from "symbols for legacy computing", this improves the smooth look on transparent terminals by using special unicode chars instead of reversing the background and foreground color on the bottom edge of the spectrum. This may lead to a glitchy mess on the bottom edge of the spectrum, this can eighter be fixed by changing the font or disabeling this. +.B visualizer_spectrum_smooth_look_legacy_chars = yes/no +Use unicode block characters from "symbols for legacy computing". This improves +the smooth look on transparent terminals by using special unicode chars instead +of reversing the background and foreground color on the bottom edge of the +spectrum. If it leads to a garbled output on the bottom edge of the spectrum, +you can either change the font or disable this option. .TP .B visualizer_spectrum_dft_size = NUMBER For spectrum visualizer, a value between 1 and 5 inclusive. Specifying a larger value makes the visualizer look at a larger slice of time, which results in less jumpy visualizer output. diff --git a/src/screens/visualizer.cpp b/src/screens/visualizer.cpp index a923fd13..e48decf2 100644 --- a/src/screens/visualizer.cpp +++ b/src/screens/visualizer.cpp @@ -519,7 +519,7 @@ void Visualizer::DrawFrequencySpectrum(const int16_t *buf, ssize_t samples, size } else { // fractional height if (flipped) { - if (Config.visualizer_spectrum_use_legacy_chars) { + if (Config.visualizer_spectrum_smooth_look_legacy_chars) { ch = SMOOTH_CHARS_FLIPPED[idx]; } else { ch = SMOOTH_CHARS[size-idx-2]; diff --git a/src/settings.cpp b/src/settings.cpp index 15129014..57a9a5bf 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -253,7 +253,7 @@ bool Configuration::read(const std::vector &config_paths, bool igno }); p.add("visualizer_autoscale", &visualizer_autoscale, "no", yes_no); p.add("visualizer_spectrum_smooth_look", &visualizer_spectrum_smooth_look, "yes", yes_no); - p.add("visualizer_spectrum_use_legacy_chars", &visualizer_spectrum_use_legacy_chars, "yes", yes_no); + p.add("visualizer_spectrum_smooth_look_legacy_chars", &visualizer_spectrum_smooth_look_legacy_chars, "yes", yes_no); p.add("visualizer_spectrum_dft_size", &visualizer_spectrum_dft_size, "2", [](std::string v) { auto result = verbose_lexical_cast(v); diff --git a/src/settings.h b/src/settings.h index 1b7e50d2..106163f0 100644 --- a/src/settings.h +++ b/src/settings.h @@ -86,7 +86,7 @@ struct Configuration size_t visualizer_fps; bool visualizer_autoscale; bool visualizer_spectrum_smooth_look; - bool visualizer_spectrum_use_legacy_chars; + bool visualizer_spectrum_smooth_look_legacy_chars; uint32_t visualizer_spectrum_dft_size; double visualizer_spectrum_gain; double visualizer_spectrum_hz_min;