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

notifications (and windows msi installer) #163

Merged
merged 8 commits into from
Sep 20, 2023
Merged

Conversation

casperstorm
Copy link
Member

@casperstorm casperstorm commented Jul 16, 2023

This PR adds notification support, along a few events: Connected, Reconnected and Disconnected.
We should add more, but for now the base should be ready.

Reason this PR also includes a new installer for Windows is that in order to get a icon on the notification on Windows we need a app_id, and the easiest way (that i know of) is to do it through a .wxs file. For that reason we might as well produce a .msi installer as our "primary" windows installation. Going forward we could then use a default .exe asset for our "portable" installer (#141) - this would then be similar to how Alacritty does releases and assets.

In any case, with the app installed through the .msi installer notifications has a small icon which looks great.

Sounds

The configuration can take a string to a sound. Each OS has a different set of default sounds, depending on OS version as well. However in order for the user to know what to pick, we need to make a entry to our wiki with the different defaults and how to find them (see below).

This entire branch is currently untested on Linux - @tarkah could you test this?

macOS (/System/Library/Sounds/)

Basso
Blow
Bottle
Frog
Funk
Glass
Hero
Morse
Ping
Pop
Purr
Sosumi
Submarine
Tink

Windows (https://github.com/allenbenz/winrt-notification/blob/main/src/lib.rs#L70-L75)

Default
IM
Mail
Reminder
SMS

Unix (https://github.com/hoodie/notify-rust/blob/main/src/hints.rs#L68)

message-new-instant
[...]

Fixes #203

@casperstorm casperstorm force-pushed the feat/notifications branch 4 times, most recently from d4befb0 to b9917ac Compare July 21, 2023 20:00
@tarkah tarkah force-pushed the feat/notifications branch 2 times, most recently from 9e9d438 to 0eef0ff Compare August 2, 2023 19:00
@casperstorm
Copy link
Member Author

@tarkah what do you think we should add before merge?

  • DM notification?
  • Highlight notification?

@jtbx jtbx mentioned this pull request Sep 9, 2023
data/src/client.rs Outdated Show resolved Hide resolved
data/src/client.rs Outdated Show resolved Hide resolved
data/src/client.rs Outdated Show resolved Hide resolved
@casperstorm casperstorm requested a review from tarkah September 19, 2023 17:17
@casperstorm casperstorm merged commit c217891 into main Sep 20, 2023
1 check passed
@casperstorm casperstorm deleted the feat/notifications branch September 20, 2023 08:59
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.

Deskto notifications?
2 participants