Skip to content
New issue

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

Add native Windows Notifications #170

Closed
wants to merge 6 commits into from

Conversation

LiHRaM
Copy link

@LiHRaM LiHRaM commented Jan 31, 2020

closes #169

Couple of things: In order for native notifications to register as coming from espanso, it needs to register an AppUserModelID during installation.
Currently, winrt_notification provides a workaround by just using Windows PowerShell's ID.

Also, I had to do a little hacking with paths, so that it correctly uses the icon both when developing on Windows, and when the app's been installed.

Screenshot:
image

@LiHRaM LiHRaM requested a review from federico-terzi January 31, 2020 19:53
@LiHRaM
Copy link
Author

LiHRaM commented Feb 1, 2020

The Windows CI is failing, but it doesn't look like the failure is caused by any changes I made?

cc @federico-terzi

@federico-terzi
Copy link
Collaborator

Hey @LiHRaM,
That notification look fantastic, thank you for your efforts!
Unfortunately, I won't be able to access my computer until tomorrow, but from a preliminary analysis it seems like the CI pipeline broke in the rust installation stage, so nothing related to your commit. Those images are changed rather frequently so it happens sometimes, tomorrow I'll try fixing it up.

Regarding the icon path, I'm going to take a closer look tomorrow, but there could be another way to solve the problem.

Regarding the addition of AppId during installation, we'll need to find a way to integrate it with InnoSetup, the packaging system currently used by espanso. But I don't think it will be much of a problem.

Thank you very much for your help :)

@LiHRaM
Copy link
Author

LiHRaM commented Feb 1, 2020

No problem! Thanks for maintaining this project, I love it!

@federico-terzi
Copy link
Collaborator

As a note to myself, this seems to solve the issue: rust-lang/rustup#2203

@federico-terzi
Copy link
Collaborator

Hey @LiHRaM,
I finally had a chance to try your request. First of all, great work, the integration looks super good!

There is a problem though that I'd like to address before merging it into espanso.
I often toggle espanso on/off, but when I do that with the new native notification, all the toast messages get queued, so that instead of updating the notification in realtime, it get delayed by a few seconds,. This becomes annoying when toggling many times in a row, as the user keeps receiving notifications for like 30 seconds.

Do you have any idea on how to solve it?

Thanks for your help :)

@LiHRaM
Copy link
Author

LiHRaM commented Feb 21, 2020 via email

@federico-terzi
Copy link
Collaborator

Hey @LiHRaM,
Thank you for the suggestion, I'll try taking a look at the raw notification API and see if there's an option.
In fact your pull request was a great help in that sense as it directed me to the right documentation resources, that I couldn't find before.
I'll keep you updated
Thanks :)

@federico-terzi
Copy link
Collaborator

Hey @LiHRaM,

Thank you for the help! I'm closing the PR as the new alpha version ships with native windows notifications :)

Thank you for pointing me in the right direction :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native Notification on Windows
2 participants