You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking through the swaync-client utility and I can't find an easy way to list the "app-name" to use when setting notification priorities in the configuration file. The python code snippet below based on this does the job:
import gi
from gi.repository import GLib
import dbus
from dbus.mainloop.glib import DBusGMainLoop
def print_notification(bus, message):
keys = ["app_name", "replaces_id", "app_icon", "summary",
"body", "actions", "hints", "expire_timeout"]
args = message.get_args_list()
if len(args) == 8:
notification = dict([(keys[i], args[i]) for i in range(8)])
print(notification["app_name"],notification["summary"], notification["body"])
loop = DBusGMainLoop(set_as_default=True)
session_bus = dbus.SessionBus()
session_bus.add_match_string("type='method_call',interface='org.freedesktop.Notifications',member='Notify',eavesdrop=true")
session_bus.add_message_filter(print_notification)
GLib.MainLoop().run()
Sway for example has the swaymsg -t get_tree that is very useful to figure out the name / app_id for a window when doing workspace assignments.
Is something similar available in the swaync-client?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First off, great tool! (Stort tack Erik!)
I'm looking through the swaync-client utility and I can't find an easy way to list the "app-name" to use when setting notification priorities in the configuration file. The python code snippet below based on this does the job:
Sway for example has the
swaymsg -t get_tree
that is very useful to figure out the name / app_id for a window when doing workspace assignments.Is something similar available in the swaync-client?
Beta Was this translation helpful? Give feedback.
All reactions