diff --git a/CHANGELOG.md b/CHANGELOG.md index 21b1f65e..36893cf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -168,6 +168,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `include-directory` and `include-file` now support relative paths. The paths are relative to the folder of the file where those directives appear. ([`#2523`](https://github.com/polybar/polybar/issues/2523)) +- `custom/ipc`: Empty output strings are no longer formatted. This prevents + extraneous spaces and separators from appearing in the bar when the output of + an ipc module is empty. ### Fixed - `custom/script`: Concurrency issues with fast-updating tailed scripts. diff --git a/src/modules/ipc.cpp b/src/modules/ipc.cpp index 20ff4d59..246d876a 100644 --- a/src/modules/ipc.cpp +++ b/src/modules/ipc.cpp @@ -90,6 +90,9 @@ namespace modules { // the format prefix/suffix also gets wrapper // with the cmd handlers string output{module::get_output()}; + if (output.empty()) { + return ""; + } for (auto&& action : m_actions) { if (!action.second.empty()) {