mirror of
https://github.com/miguelmota/cointop
synced 2024-11-16 21:25:38 +00:00
1.4 KiB
1.4 KiB
beeep
beeep
provides a cross-platform library for sending desktop notifications, alerts and beeps.
Installation
go get -u github.com/gen2brain/beeep
Examples
err := beeep.Beep(beeep.DefaultFreq, beeep.DefaultDuration)
if err != nil {
panic(err)
}
err := beeep.Notify("Title", "Message body", "assets/information.png")
if err != nil {
panic(err)
}
err := beeep.Alert("Title", "Message body", "assets/warning.png")
if err != nil {
panic(err)
}
macOS
For icons to show up when using Alert() or Notify(), you will need to bundle your application with a app icon.
More
For cross-platform dialogs and input boxes see dlgs.