Merge pull request #31 from azuwis/update-freq

Fix update_freq
This commit is contained in:
Felix Kratz 2021-09-04 09:03:28 +02:00 committed by GitHub
commit 4d4ff5d058
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ void bar_item_script_update(struct bar_item* bar_item, bool forced) {
if (!bar_item->scripting || (bar_item->update_frequency == 0 && !forced)) return;
if (strcmp(bar_item->script, "") != 0) {
bar_item->counter++;
if (bar_item->update_frequency < bar_item->counter || forced) {
if (bar_item->update_frequency <= bar_item->counter || forced) {
bar_item->counter = 0;
fork_exec(bar_item->script, NULL);
}