From 29612a7851d985558c5484e09ae506b84d7e07ff Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 9 Apr 2022 12:18:09 +0200 Subject: [PATCH] i3-companion: just wait more for bluetooth device change This way, we wait enough to get battery level. Signal from PulseAudio cannot be captured for some reason. UPower does not send a signal for the new battery. And Bluez does not either. --- bin/i3-companion | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bin/i3-companion b/bin/i3-companion index 461ac7f..617dde7 100755 --- a/bin/i3-companion +++ b/bin/i3-companion @@ -743,18 +743,9 @@ async def bluetooth_notifications(i3, event, path, interface, changed, invalid): and "Percentage" in args[1] ), ), - DBusSignal( - path="/org/pulseaudio", - interface="org.freedesktop.DBus.Properties", - member="PropertiesChanged", - signature="sa{sv}as", - onlyif=lambda args: ( - args[0] == "org.bluez.BatteryProvider1" and "Percentage" in args[1] - ), - ), ) @retry(2) -@debounce(1) +@debounce(4) @polybar("bluetooth") async def bluetooth_status(i3, event, *args): """Update bluetooth status for Polybar."""