111

GitHub - gen2brain/beeep: Go cross-platform library for sending desktop notifica...

 6 years ago
source link: https://github.com/gen2brain/beeep
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

beeep

beeep provides a cross-platform library for sending desktop notifications, alerts and beeps.

Installation

go get -u github.com/gen2brain/beeep

Build tags

  • nodbus - disable godbus/dbus and use only notify-send

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)
}

For cross-platform dialogs and input boxes see dlgs.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK