1
0
Fork 0
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:
Michael Carlberg 2016-06-14 05:24:56 +02:00
parent d0e12fdcd0
commit ea15f4a5de

View file

@ -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)