mirror of
https://github.com/polybar/polybar.git
synced 2025-04-14 17:33:17 -04:00
fix(battery): Prevent broadcast if values are unchanged
This commit is contained in:
parent
d0e12fdcd0
commit
ea15f4a5de
1 changed files with 3 additions and 0 deletions
|
@ -142,6 +142,9 @@ bool BatteryModule::on_event(InotifyEvent *event)
|
|||
state = STATE_FULL;
|
||||
}
|
||||
|
||||
if (this->state == state && this->percentage == percentage)
|
||||
return false;
|
||||
|
||||
if (!this->label_charging_tokenized)
|
||||
this->label_charging_tokenized = this->label_charging->clone();
|
||||
if (!this->label_discharging_tokenized)
|
||||
|
|
Loading…
Add table
Reference in a new issue