mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-08-04 10:14:34 +02:00
i3-companion: rename network_manager_update
The goal is only to display notifications.
This commit is contained in:
parent
d56b44114a
commit
b3c386b778
1 changed files with 4 additions and 1 deletions
|
@ -383,10 +383,12 @@ async def output_update(i3, event):
|
|||
signature="uu",
|
||||
)
|
||||
)
|
||||
async def network_manager_update(i3, event, path, state, reason):
|
||||
async def network_manager_notifications(i3, event, path, state, reason):
|
||||
logger.debug("from %s state: %d, reason: %d", path, state, reason)
|
||||
NM_ACTIVE_CONNECTION_STATE_ACTIVATED = 2
|
||||
if state not in {NM_ACTIVE_CONNECTION_STATE_ACTIVATED}:
|
||||
# We cannot get proper state unless the connection is
|
||||
# activated, unless we maintain state.
|
||||
return
|
||||
peer = i3.system_bus["org.freedesktop.NetworkManager"][path]
|
||||
try:
|
||||
|
@ -465,6 +467,7 @@ async def main(options):
|
|||
)
|
||||
async def wrapped(path, args):
|
||||
return await fn(i3, event, path, *args)
|
||||
|
||||
return wrapped
|
||||
|
||||
bus.listen_signal(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue