mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-28 04:20:03 +02:00
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.
This commit is contained in:
parent
59382c1739
commit
29612a7851
1 changed files with 1 additions and 10 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue