We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is the minimal code to reproduce the issue.
from notifypy import Notify n = Notify(enable_logging=True) n.send()
The above code snippet results in the following notification on Arch Linux.
While the output in stdout shows the following:
2023-12-03 21:22:11.679 | INFO | notifypy.notify:__init__:50 - Logging is enabled. 2023-12-03 21:22:11.685 | INFO | notifypy.os_notifiers.linux:<module>:16 - libnotify found, using it for notifications 2023-12-03 21:22:11.685 | DEBUG | notifypy.os_notifiers.linux:<module>:28 - aplay binary not installed.. audio will not work! 2023-12-03 21:22:11.686 | DEBUG | notifypy.os_notifiers.linux:send_notification:74 - Generated command: ['/usr/bin/notify-send', 'Default Title', 'Default Message', "--icon='/home/white/study/SDM404/Assessment 3/SDM404 Final Project/venv/lib/python3.11/site-packages/notifypy/py-logo.png'", "--app-name='Python Application (notify.py)'", '-u', 'normal'] 2023-12-03 21:22:11.704 | INFO | notifypy.notify:send_notification:351 - Sent notification.
It is because of unnecessary extra quotation while calling:
notify-py/notifypy/os_notifiers/linux.py
Lines 62 to 65 in 0c09c6b
According to the subprocess documentation, it takes over argument quotation if needed. After a small correction it works like a charm.
if notification_icon: generated_command.extend(['--icon', notification_icon]) if kwargs.get("application_name"): generated_command.extend(['--app-name', kwargs.get('application_name')])
2023-12-03 21:25:46.435 | INFO | notifypy.notify:__init__:50 - Logging is enabled. 2023-12-03 21:25:46.441 | INFO | notifypy.os_notifiers.linux:<module>:16 - libnotify found, using it for notifications 2023-12-03 21:25:46.441 | DEBUG | notifypy.os_notifiers.linux:<module>:28 - aplay binary not installed.. audio will not work! 2023-12-03 21:25:46.441 | DEBUG | notifypy.os_notifiers.linux:send_notification:72 - Generated command: ['/usr/bin/notify-send', 'Default Title', 'Default Message', '--icon', '/home/white/study/SDM404/Assessment 3/SDM404 Final Project/venv/lib/python3.11/site-packages/notifypy/py-logo.png', '--app-name', 'Python Application (notify.py)', '-u', 'normal'] 2023-12-03 21:25:46.457 | INFO | notifypy.notify:send_notification:351 - Sent notification.
The text was updated successfully, but these errors were encountered:
Fix icon and application name in libnotify command (ms7m#57)
7e685cc
No branches or pull requests
Here is the minimal code to reproduce the issue.
The above code snippet results in the following notification on Arch Linux.
While the output in stdout shows the following:
It is because of unnecessary extra quotation while calling:
notify-py/notifypy/os_notifiers/linux.py
Lines 62 to 65 in 0c09c6b
According to the subprocess documentation, it takes over argument quotation if needed. After a small correction it works like a charm.
The text was updated successfully, but these errors were encountered: