hrkfdn / ncspot

Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes.
BSD 2-Clause "Simplified" License
4.93k stars 205 forks source link

Support notifications with correct Title and Icon on macOS #614

Open deed02392 opened 2 years ago

deed02392 commented 2 years ago

Is your feature request related to a problem? Please describe. We can implement decent looking notifications on macOS with notify_rust including the Spotify app title and icon (but unfortunately not cover art) using the platform specific function to impersonate the Spotify app when generating notifications: https://docs.rs/notify-rust/4.5.3/notify_rust/#functions

Describe the solution you'd like Support notifications with the Spotify title (instead of Terminal) and the Spotify icon on macOS

hrkfdn commented 2 years ago

This feature already exists, it just needs to be enabled during build. By default it should be turned on, but it looks like it's off in the homebrew formula.

deed02392 commented 2 years ago

Thanks @hrkfdn, the feature exists and I've enabled it:

cargo run --no-default-features --features rodio_backend,cursive/pancurses-backend,share_clipboard,notify,mpris

however the notifications are currently generic (mentioning Terminal and using the Terminal icon), so this issue is to track the macOS platform specific customisation that would enable impersonating the Spotify desktop app title and icon to improve the aesthetics of the notification.

hrkfdn commented 2 years ago

I couldn't find a crate yet that supports this. Are you aware of any?

deed02392 commented 2 years ago

Yea the crate we're already using notify_rust supports this, but only if the user already has Spotify installed as well. Check out this note for macOS: https://docs.rs/notify-rust/4.5.3/notify_rust/struct.Notification.html#platform-support-1

it pulls a function out of mac_notification_sys

jacksongoode commented 1 year ago

Would be very nice ^^