mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
fix(script): Do not process empty script output
This commit is contained in:
parent
8535f5a83d
commit
40524979d0
1 changed files with 4 additions and 1 deletions
|
@ -50,11 +50,14 @@ bool ScriptModule::update()
|
|||
log_error(e.what());
|
||||
}
|
||||
|
||||
return true;
|
||||
return !this->output.empty();
|
||||
}
|
||||
|
||||
std::string ScriptModule::get_output()
|
||||
{
|
||||
if (this->output.empty())
|
||||
return "";
|
||||
|
||||
if (!this->click_left.empty())
|
||||
this->builder->cmd(Cmd::LEFT_CLICK, string::replace_all(this->click_left, "%counter%", std::to_string(this->counter)));
|
||||
if (!this->click_middle.empty())
|
||||
|
|
Loading…
Reference in a new issue