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

Support notify on macOS with the alert package #10

Closed
gsingh93 opened this issue Apr 17, 2023 · 2 comments
Closed

Support notify on macOS with the alert package #10

gsingh93 opened this issue Apr 17, 2023 · 2 comments

Comments

@gsingh93
Copy link

As far as I know the notifications package doesn't support macOS. alert is an alternative that does work on macOS and other platforms. Would you accept a PR that allows customizing whether notifications or alert is used depending on some configuration option (i.e. (setq hammy-use-alert t), feel free to suggest a better name)?

This isn't really preventing me from using the package, as I can just use some other lisp code to work around this, but it would be nice to use the built-in notify pseudo-function.

I don't think we would need to add alert as a dependency, as this option would be off by default, but open to your thoughts about this.

@alphapapa
Copy link
Owner

alphapapa commented Apr 18, 2023

Hi,

Generally I'd prefer not to add options for integrations with specific other packages. In this case, if notifications-notify is truly useless for a Mac user, it would seem appropriate for that user to do something like:

(define-advice notifications-notify
    (:override (&rest params) using-alert)
  (alert (plist-get params :body)
         :title (plist-get params :title)))

That would solve the problem for any library that calls notifications-notify, wouldn't it? If so, it might be appropriate to propose an addition to alert that would implement advice like that as a minor mode that Mac users could activate.

What do you think? Thanks.

@gsingh93
Copy link
Author

This makes sense to me, I'll open an issue on the alert repo. Thanks!

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

No branches or pull requests

2 participants