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

Clicking the notification opens AppleScript editor #35

Open
advdv opened this issue Feb 5, 2020 · 3 comments
Open

Clicking the notification opens AppleScript editor #35

advdv opened this issue Feb 5, 2020 · 3 comments

Comments

@advdv
Copy link

advdv commented Feb 5, 2020

As the title says, with the example like :

package main

import (
	"github.com/gen2brain/beeep"
)

func main() {

	err := beeep.Notify("Title", "Message body", "")
	if err != nil {
		panic(err)
	}

	select {}
}

When the notification is clicked it will open the AppleScript editor. This seems to be a side effect from using the applescript approach: https://discussions.apple.com/thread/6449168

This issue is pretty old so maybe a solution was become available in the meantime?

@gen2brain
Copy link
Owner

Not sure, I don't use macOS and so cannot follow the changes there, I just sometimes use VM for testing. I think the only possible solution (without CGO) is to use Applescript, suggestions, and PRs are welcome.

@advdv
Copy link
Author

advdv commented Feb 5, 2020

Thank you for the response. I've searched around but there doesn't seem to be a fix for this and is intrinsic to the use of applescript for notifications. Maybe a warning in the Readme or leave this issue open for others to find?

Since the keybase's library also has issues (https://github.com/keybase/go-notifier/issues) I think the 2MB binary embed approach of https://github.com/deckarep/gosx-notifier is currently the only solution that provides a complete user experience on macOS. Unfortunately, but i'm happy to be proven wrong and help with testing of any alternatives.

@gen2brain
Copy link
Owner

There were already suggestions to use embedded binaries, but I don't like that approach. This lib doesn't try to offer complete experience on all OSes but tries to just work everywhere.
In this case, IMO if there is no support for notifications actions in applescript, but default is to open script editor, issue should be filed there maybe? That doesn't seem to be reasonable default, but there is no public tracker there, or I cannot find it.

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