YuriyLisovskiy / pynotifier

Python notifications
https://pypi.org/project/py-notifier
MIT License
61 stars 12 forks source link

image not showing in linux #8

Open MusheAbdulHakim opened 3 years ago

MusheAbdulHakim commented 3 years ago

I used this code:

`from pynotifier import Notification

Notification( title='Notification Title', description='Notification Description', icon_path='icons/bitcoin.png', # On Windows .ico is required, on Linux - .png duration=5, # Duration in seconds urgency='normal' ).send()`

the notification came alright but there was no icon . I am using Parrot Os

YuriyLisovskiy commented 3 years ago

Thank you for your feedback. To display an icon, you need to set its absolute path. I will note it to the readme.md file soon. (Done)

jhanarato commented 2 years ago

I'm also on linux. No icon is shown event when an absolute path is used.

ErykPiasecki07 commented 2 years ago

Can confirm same issue on MacOS

YuriyLisovskiy commented 2 years ago

Can confirm same issue on MacOS

The pynotifier uses pync module to display notifications on macOS. The pync uses terminal-notifier 2.0.0. I suppose there are some issues with the pync module or terminal-notifier application.

I will try to replace the pync with an alternative module or app.

YuriyLisovskiy commented 2 years ago

I'm also on linux. No icon is shown event when an absolute path is used.

It is strange. I will look into this issue and fix it as soon as possible.

YuriyLisovskiy commented 1 year ago

I'm also on linux. No icon is shown event when an absolute path is used.

On Ubuntu 20.04 LTS the icon works fine. What Linux distro are you using?

YuriyLisovskiy commented 1 year ago

Can confirm same issue on MacOS

Currently, it is not possible to display the custom icon for the notification on macOS with AppleScript (which is used for now), or an external tool (or maybe there is some, please let me know). If you have an idea and can implement it, please open the PR with relevant changes :)