From fc3563777a204d02a4d91b604c95cfe4f3720378 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 16 Jul 2021 01:18:19 +0200 Subject: [PATCH] i3-companion: make more properties of DBusSignal optional --- bin/i3-companion | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/bin/i3-companion b/bin/i3-companion index e59a5ef..629cca1 100755 --- a/bin/i3-companion +++ b/bin/i3-companion @@ -91,8 +91,8 @@ logger = logging.getLogger("i3-companion") # Events for @on decorator DBusSignal = collections.namedtuple( "DBusSignal", - ["system", "path", "interface", "member", "signature", "onlyif"], - defaults=(None,), + ["interface", "member", "signature", "system", "path", "onlyif"], + defaults=(True, "/", None), ) StartEvent = object() I3Event = i3ipc.Event @@ -581,7 +581,6 @@ async def output_update(i3, event): @on( DBusSignal( - system=True, path="/org/bluez", interface="org.freedesktop.DBus.Properties", member="PropertiesChanged", @@ -612,7 +611,6 @@ async def bluetooth_notifications( @on( StartEvent, DBusSignal( - system=True, path="/org/bluez", interface="org.freedesktop.DBus.Properties", member="PropertiesChanged", @@ -744,8 +742,6 @@ async def dunst_status_check(i3, event): @on( DBusSignal( - system=True, - path="/", interface="org.freedesktop.NetworkManager.Connection.Active", member="StateChanged", signature="uu", @@ -790,15 +786,11 @@ async def network_manager_notifications(i3, event, path, state, reason): @on( StartEvent, DBusSignal( - system=True, - path="/", interface="org.freedesktop.NetworkManager.Connection.Active", member="StateChanged", signature="uu", ), DBusSignal( - system=True, - path="/", interface="org.freedesktop.NetworkManager.AccessPoint", member="PropertiesChanged", signature="a{sv}",