Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ignis/services/notifications/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(
timeout: int,
time: float,
popup: bool,
transient: bool,
):
super().__init__()

Expand All @@ -36,6 +37,7 @@ def __init__(
self._time = time
self._urgency = urgency
self._popup = popup
self._transient = transient
self._actions = [
NotificationAction(
id=str(actions[i]),
Expand Down Expand Up @@ -137,6 +139,13 @@ def popup(self) -> bool:
"""
return self._popup

@IgnisProperty
def transient(self) -> bool:
"""
Whether the notification is transient (ignored in any notification center implementation).
"""
return self._transient

@IgnisProperty
def json(self) -> dict:
"""
Expand Down
1 change: 1 addition & 0 deletions ignis/services/notifications/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ def __init_notification(
timeout=options.notifications.popup_timeout if timeout == -1 else timeout,
time=datetime.now().timestamp(),
popup=not options.notifications.dnd,
transient=hints.get("transient", False),
)

if len(self.popups) >= options.notifications.max_popups_count:
Expand Down