From 806b97895e29d151eea8db1779df267792a560e0 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Wed, 16 Sep 2020 09:09:49 +0200 Subject: [PATCH] [bumblebee] add small sleep before update in some situations/modules (spotify, playerctl, etc.), it is possible that a state change (e.g. play/pause) takes a small time to actually propagate into the whole system (e.g. until the next "update" retrieves the correct value). To alleviate that, add a very small delay to the update. --- bumblebee-status | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bumblebee-status b/bumblebee-status index f6bcb94..d7e8dab 100755 --- a/bumblebee-status +++ b/bumblebee-status @@ -68,6 +68,8 @@ def handle_input(output, update_lock): modules[event["name"]] = True except ValueError: pass + + time.sleep(0.2) if update_lock.acquire(blocking=False) == True: core.event.trigger("update", modules.keys(), force=True) core.event.trigger("draw")