vendor/github.com/gen2brain/beeep/README.md

37 lines · 999 bytes

 1## beeep
 2[![Build Status](https://github.com/gen2brain/beeep/actions/workflows/build.yml/badge.svg)](https://github.com/gen2brain/beeep/actions)
 3[![Go Reference](https://pkg.go.dev/badge/github.com/gen2brain/beeep.svg)](https://pkg.go.dev/github.com/gen2brain/beeep)
 4[![Go Report Card](https://goreportcard.com/badge/github.com/gen2brain/beeep?branch=master)](https://goreportcard.com/report/github.com/gen2brain/beeep) 
 5
 6`beeep` provides a cross-platform library for sending desktop notifications, alerts and beeps.
 7
 8### Installation
 9
10    go get -u github.com/gen2brain/beeep
11
12### Build tags
13
14* `nodbus` - disable `godbus/dbus` and use only `notify-send`
15
16### Examples
17
18```go
19err := beeep.Beep(beeep.DefaultFreq, beeep.DefaultDuration)
20if err != nil {
21    panic(err)
22}
23```
24
25```go
26err := beeep.Notify("Title", "Message body", "assets/information.png")
27if err != nil {
28    panic(err)
29}
30```
31
32```go
33err := beeep.Alert("Title", "Message body", "assets/warning.png")
34if err != nil {
35    panic(err)
36}
37```