nudge

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NudgeCallback

type NudgeCallback func(message string, emotion string)

NudgeCallback is called when a nudge should be sent

type Scheduler

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

Scheduler manages idle detection and nudge delivery

func NewScheduler

func NewScheduler() *Scheduler

NewScheduler creates a new nudge scheduler

func (*Scheduler) RecordActivity

func (s *Scheduler) RecordActivity()

RecordActivity updates the last activity timestamp

func (*Scheduler) SetCallback

func (s *Scheduler) SetCallback(cb NudgeCallback)

SetCallback sets the nudge delivery callback

func (*Scheduler) Start

func (s *Scheduler) Start()

Start begins the idle checking loop

func (*Scheduler) Stop

func (s *Scheduler) Stop()

Stop stops the scheduler

Jump to

Keyboard shortcuts

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