Skip to content

Commit 665ca19

Browse files
committed
support for text based notification ids
1 parent a1644fa commit 665ca19

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lnxlink/modules/notify.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self, lnxlink):
2121
def _requirements(self):
2222
self.lib = {
2323
"notify": import_install_package(
24-
"dbus-notification", ">=2026.2.0", "dbus_notification"
24+
"dbus-notification", ">=2026.2.1", "dbus_notification"
2525
),
2626
}
2727

@@ -87,6 +87,8 @@ def start_control(self, topic, data):
8787
if data.get("action") == "close":
8888
if data.get("id") is not None:
8989
self.notify.close(data.get("id"))
90+
elif data.get("uniqueid") is not None:
91+
self.notify.close(data.get("uniqueid"))
9092
else:
9193
self.notify.close_all()
9294
else:
@@ -99,6 +101,8 @@ def start_control(self, topic, data):
99101
actions=data.get("buttons", []),
100102
urgency=urgencies.get(data.get("urgency")),
101103
timeout=data.get("timeout", -1),
104+
notifyid=data.get("notifyid", 0),
105+
uniqueid=data.get("uniqueid", None),
102106
)
103107
logger.info("The notification %s was sent.", notification_id)
104108
self.lnxlink.run_module(self.name, {"id": notification_id})

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SpeechRecognition>=3.10.0
1616
dbus-idle>=2025.5.1
1717
dbus-mediaplayer>=2025.6.0
1818
dbus-networkdevices>=2024.0.7
19-
dbus-notification>=2026.2.0
19+
dbus-notification>=2026.2.1
2020
docker>=7.0.0
2121
ewmh>=0.1.6
2222
flask>=3.0.3

0 commit comments

Comments
 (0)