notifications

package
v0.9.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupported

func IsSupported() bool

IsSupported returns true if notifications are supported on the current platform

Types

type Notification

type Notification struct {
	Title    string
	Message  string
	Type     NotificationType
	Priority Priority
	Sound    bool
	Icon     string
}

Notification represents a system notification

type NotificationManager

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

NotificationManager handles cross-platform notifications

func NewNotificationManager

func NewNotificationManager(enabled bool) *NotificationManager

NewNotificationManager creates a new notification manager

func (*NotificationManager) Send

func (nm *NotificationManager) Send(notification Notification) error

Send sends a notification to the OS

func (*NotificationManager) SendBreakReminder

func (nm *NotificationManager) SendBreakReminder(duration time.Duration) error

SendBreakReminder sends a break reminder notification

func (*NotificationManager) SendEndOfDayReminder

func (nm *NotificationManager) SendEndOfDayReminder(totalTime time.Duration, targetHours float64) error

SendEndOfDayReminder sends an end-of-day reminder notification

func (*NotificationManager) SendIdleDetected

func (nm *NotificationManager) SendIdleDetected(idleDuration time.Duration) error

SendIdleDetected sends an idle detection notification

func (*NotificationManager) SendSessionComplete

func (nm *NotificationManager) SendSessionComplete(duration time.Duration, project string) error

SendSessionComplete sends a session completion notification

func (*NotificationManager) TestNotification

func (nm *NotificationManager) TestNotification() error

TestNotification sends a test notification to verify the system is working

type NotificationType

type NotificationType int

NotificationType represents different types of notifications

const (
	BreakReminder NotificationType = iota
	EndOfDayReminder
	SessionComplete
	IdleDetected
	Custom
)

type Priority

type Priority int

Priority represents notification priority levels

const (
	Low Priority = iota
	Normal
	High
	Critical
)

Jump to

Keyboard shortcuts

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