diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f4936cd..160aadbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- `custom/script`: Output clearing when `exec-if` fails ([`#2674`](https://github.com/polybar/polybar/issues/2674)) ## [3.6.2] - 2022-04-03 ### Fixed diff --git a/src/adapters/script_runner.cpp b/src/adapters/script_runner.cpp index 23a791f4..c1742199 100644 --- a/src/adapters/script_runner.cpp +++ b/src/adapters/script_runner.cpp @@ -45,7 +45,10 @@ script_runner::interval script_runner::process() { } void script_runner::clear_output() { - set_output(""); + auto changed = set_output(""); + if (changed) { + m_on_update(m_data); + } } void script_runner::stop() {