nudge

package
v0.0.0-...-022baea Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Work nudgeStage = iota
	BreakReminder
	ShortBreak
	LongBreak
	Overtime
)

Variables

This section is empty.

Functions

func FindActiveWindowTitle

func FindActiveWindowTitle() string

func MatchSchedule

func MatchSchedule(schedule string, advance time.Duration) bool

Parse and match cron schedule definition ┌───────────── minute (0 - 59) │ ┌───────────── hour (0 - 23) │ │ ┌───────────── day of the month (1 - 31) │ │ │ ┌───────────── month (1 - 12) │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday; │ │ │ │ │ 7 is also Sunday on some systems) │ │ │ │ │ │ │ │ │ │ * * * * * Each value may specify an interval, e.g.: * 18-08 * * 1-5 Translates to this: from 18 till 8 from Monday till Friday

func ValidateSchedule

func ValidateSchedule(schedule string) error

Types

type Nudger

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

func New

func New(app fyne.App, cfg *config.Config, ctx context.Context) *Nudger

func (*Nudger) Nudge

func (s *Nudger) Nudge()

func (*Nudger) Start

func (s *Nudger) Start()

Jump to

Keyboard shortcuts

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