mirror of
https://github.com/muesli/telephant
synced 2024-11-26 13:20:18 +00:00
23 lines
386 B
Go
23 lines
386 B
Go
// +build linux
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/gen2brain/beeep"
|
|
)
|
|
|
|
func notify(title string, body string) {
|
|
err := beeep.Notify(title, body, "")
|
|
if err != nil {
|
|
fmt.Println("Error sending notification:", err)
|
|
}
|
|
}
|
|
|
|
func init() {
|
|
err := beeep.Beep(beeep.DefaultFreq, beeep.DefaultDuration)
|
|
if err != nil {
|
|
fmt.Println("Error initializing notifications:", err)
|
|
}
|
|
}
|