mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-26 19:58:35 +02:00
i3-companion: avoid invoking bluetooth_status() without creating a task
This commit is contained in:
parent
14604234f1
commit
6e7d529abf
1 changed files with 2 additions and 1 deletions
|
@ -860,7 +860,8 @@ async def bluetooth_status(i3, event, *args):
|
||||||
output[-1] = f"{output[-1]},{icon}"
|
output[-1] = f"{output[-1]},{icon}"
|
||||||
# Schedule a refresh in 5 minutes
|
# Schedule a refresh in 5 minutes
|
||||||
bluetooth_status.scheduled = loop.call_later(
|
bluetooth_status.scheduled = loop.call_later(
|
||||||
600, asyncio.create_task, bluetooth_status(i3, StartEvent)
|
600,
|
||||||
|
lambda: asyncio.create_task(bluetooth_status(i3, StartEvent)),
|
||||||
)
|
)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.info("cannot get battery status: %s", exc)
|
logger.info("cannot get battery status: %s", exc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue