From 7e685cc17d93e80b9a00304a7c42250ffaae654d Mon Sep 17 00:00:00 2001 From: Anton Belyaev Date: Sun, 3 Dec 2023 21:56:06 +1030 Subject: [PATCH] Fix icon and application name in libnotify command (#57) --- notifypy/os_notifiers/linux.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/notifypy/os_notifiers/linux.py b/notifypy/os_notifiers/linux.py index 5882481..1ec77c3 100644 --- a/notifypy/os_notifiers/linux.py +++ b/notifypy/os_notifiers/linux.py @@ -1,6 +1,5 @@ from loguru import logger import subprocess -import shlex from ..exceptions import BinaryNotFound from ._base import BaseNotifier @@ -61,12 +60,10 @@ def send_notification( ] if notification_icon: - generated_command.append(f"--icon={shlex.quote(notification_icon)}") + generated_command.extend(["--icon", notification_icon]) if kwargs.get("application_name"): - generated_command.append( - f"--app-name={shlex.quote(kwargs.get('application_name'))}" - ) + generated_command.extend(["--app-name", kwargs.get("application_name")]) if kwargs.get('notification_urgency'): generated_command.extend(["-u", kwargs.get('notification_urgency')])