From 8fa546d4a57d177acbc9191c55589962ef76701c Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 5 Jul 2024 20:29:19 +0200 Subject: [PATCH] i3-companion: also listen to new interfaces to get battery status --- bin/i3-companion | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/i3-companion b/bin/i3-companion index 3c4d1fc..539e9f6 100755 --- a/bin/i3-companion +++ b/bin/i3-companion @@ -790,9 +790,16 @@ async def bluetooth_notifications(i3, event, path, interface, changed, invalid): and "Percentage" in args[1] ), ), + DBusSignal( + path="/org/bluez", + interface="org.freedesktop.DBus.ObjectManager", + member="InterfacesAdded", + signature="oa{sa{sv}}", + onlyif=lambda args: ("org.bluez.Battery1" in args[1]), + ), ) @retry(2) -@debounce(4) +@debounce(1) @polybar("bluetooth") async def bluetooth_status(i3, event, *args): """Update bluetooth status for Polybar."""