Last active
May 19, 2024 05:35
-
-
Save dhjw/ce8d9b83c963576f80c08d110c50b67d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install sdbus-notifications | |
from sdbus_block.notifications import FreedesktopNotifications | |
iface = FreedesktopNotifications() # default bus works, but could do `from sdbus import sd_bus_open_user` and pass sd_bus_open_user() | |
app_name = '' | |
replace_id = 0 # new | |
app_icon = '' | |
summary = 'title' | |
body = 'body' | |
hints = iface.create_hints(urgency=1) | |
actions = [] | |
expire_time = 3000 | |
nid = iface.notify(app_name, replace_id, app_icon, summary, body, actions, hints, expire_time) | |
# iface.close_notification(nid) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment