notify

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package notify sends native OS desktop notifications, giving the desktop build parity with other native apps: events such as alarms surface through the host notification centre instead of only inside the app window.

It is a thin adapter over github.com/gen2brain/beeep. Notify and Alert reach the OS and therefore need a display/desktop session to succeed; AlarmMessage is a pure formatter with no side effects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlarmMessage

func AlarmMessage(tagName, severity, value string) (title, body string)

AlarmMessage formats an alarm into a notification title and body. It is a pure helper: it takes plain strings, imports no alarm/core types, and has no side effects, so it is safe to unit-test in a headless environment.

func Alert

func Alert(title, message string) error

Alert shows a desktop notification that also plays the system alert sound, for events that need the user's attention.

func Notify

func Notify(title, message string) error

Notify shows a standard desktop notification. The icon path is left empty so the host default is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL