system

package
v0.26041.1000-preview Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package system provides desktop system notification provider using beeep

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupported

func IsSupported() bool

IsSupported checks if system notifications are supported on the current platform beeep supports: Windows, macOS, Linux, BSD, Unix

Types

type Config

type Config struct {
	// AppName is the name of the application (default: "notify")
	AppName string `json:"app_name,omitempty"`
	// Sound to play (path to sound file, empty for default)
	Sound string `json:"sound,omitempty"`
	// Icon is the path to icon file
	Icon string `json:"icon,omitempty"`
}

Config holds system notification configuration

type Option

type Option func(*Provider)

Option configures a system Provider

func WithIcon

func WithIcon(path string) Option

WithIcon sets the icon file path

func WithName

func WithName(name string) Option

WithName sets a custom provider name

func WithSound

func WithSound(path string) Option

WithSound sets the sound file path

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider sends desktop system notifications using beeep

func New

func New(config Config, opts ...Option) *Provider

New creates a new system notification provider

func (*Provider) Close

func (p *Provider) Close() error

Close cleans up provider resources

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name

func (*Provider) Send

func (p *Provider) Send(ctx context.Context, notification *notify.Notification) (*notify.Result, error)

Send sends a desktop notification using beeep

Jump to

Keyboard shortcuts

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