File: alert_unix.go

package info (click to toggle)
golang-github-gen2brain-beeep 0.0~git20240516.9c00667-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: makefile: 4
file content (12 lines) | stat: -rw-r--r-- 351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
//go:build linux || freebsd || netbsd || openbsd || illumos
// +build linux freebsd netbsd openbsd illumos

package beeep

// Alert displays a desktop notification and plays a beep.
func Alert(title, message, appIcon string) error {
	if err := Notify(title, message, appIcon); err != nil {
		return err
	}
	return Beep(DefaultFreq, DefaultDuration)
}