-
Notifications
You must be signed in to change notification settings - Fork 574
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
hs.notify autoWithdraw not working after reload #2422
Comments
1- This method has no effect if the user has set Hammerspoon notifications to Alert in the Notification Center pane of System Preferences: clicking on either the action or other button will clear the notification automatically. 2- If a notification which was created before your last reload (or restart) of Hammerspoon and is clicked upon before hs.notify has been loaded into memory, this setting will not be honored because the initial application delegate is not aware of this option and is set to automatically withdraw all notifications which are acted upon. |
You'll need to store the notification tags somewhere (i.e. in a JSON file), and re-register them when Hammerspoon reloads. |
can u explain more please? |
Actually, I just remembered that there's some things broken in Hammerspoon that prevent this from working correctly. I think the only way to really do this currently is using Related:
|
Behavior as is:
The
autoWithdraw
functionality inhs.notify
doesn't seem to work after the configuration has been reloaded.If have a function to reload the config (on key press or file change using pathwatcher).
The configuration reloads, the notification appears but stays.
Running only the notify code in the console works as expected.
Running it as a one-liner in the console (concatenated with ";", even without calling the function) doesn't work: the notification stays. Switching order doesn't work either.
Expected behavior:
The configuration reloads, the notification appears and withdraws after 2 seconds.
System information:
Tested on Mac OS 10.13.6 and 10.15.5
Hammerspoon: 0.9.78 (5164)
The text was updated successfully, but these errors were encountered: