macOS: add ability to show subtitles in notifications

This used to be implemented before 4e3c6e52aa, when the now deprecated notifications framework was still being used.
Implement it again for feature parity.
This commit is contained in:
Luflosi
2020-09-28 12:17:26 +02:00
parent d3d2930bd2
commit 7c4ad278d5
4 changed files with 18 additions and 13 deletions

View File

@@ -20,9 +20,10 @@ if is_macos:
timeout: int = 5000,
application: str = 'kitty',
icon: bool = True,
identifier: Optional[str] = None
identifier: Optional[str] = None,
subtitle: Optional[str] = None,
) -> None:
cocoa_send_notification(identifier, title, body)
cocoa_send_notification(identifier, title, body, subtitle)
else:
@@ -48,7 +49,8 @@ else:
timeout: int = -1,
application: str = 'kitty',
icon: bool = True,
identifier: Optional[str] = None
identifier: Optional[str] = None,
subtitle: Optional[str] = None,
) -> None:
icf = ''
if icon is True: