Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAvailable ¶
func IsAvailable() bool
IsAvailable returns true if native notifications are available.
Types ¶
type LinuxSender ¶
type LinuxSender struct {
// contains filtered or unexported fields
}
LinuxSender sends notifications via notify-send (libnotify).
func (*LinuxSender) IsAvailable ¶
func (s *LinuxSender) IsAvailable() bool
IsAvailable checks if notify-send is available.
func (*LinuxSender) Send ¶
func (s *LinuxSender) Send(message, title string, urgency int) bool
Send sends a notification via notify-send.
func (*LinuxSender) SetAppName ¶ added in v0.1.1
func (s *LinuxSender) SetAppName(name string)
SetAppName sets the application name for notifications.
func (*LinuxSender) SetIcon ¶ added in v0.1.1
func (s *LinuxSender) SetIcon(icon string)
SetIcon sets the icon for notifications. Can be a stock icon name (e.g., "dialog-information") or a file path.
func (*LinuxSender) SetTimeout ¶ added in v0.1.1
func (s *LinuxSender) SetTimeout(ms int)
SetTimeout sets the notification timeout in milliseconds. Use 0 for default, -1 for never expire.
type MacOSSender ¶
type MacOSSender struct {
// contains filtered or unexported fields
}
MacOSSender sends notifications via osascript (AppleScript).
func (*MacOSSender) IsAvailable ¶
func (s *MacOSSender) IsAvailable() bool
IsAvailable checks if osascript is available.
type WindowsSender ¶
type WindowsSender struct {
// contains filtered or unexported fields
}
WindowsSender sends notifications via PowerShell toast notifications.
func (*WindowsSender) IsAvailable ¶
func (s *WindowsSender) IsAvailable() bool
IsAvailable checks if PowerShell is available on Windows.