hey

package module
Version: v0.0.0-...-4bb9fc0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: MIT Imports: 3 Imported by: 0

README

hey

GoDoc Go Report Card

hey is a tiny library for displaying notifications on Linux.

hey.Push(hey.Notification{
	Title:    "foo",
	Body:     "bar",
	AppName:  "computer",
	Duration: hey.DefaultDuration,
})

Run go test to see an example notification.

Documentation

Index

Constants

View Source
const DefaultDuration = -1 * time.Millisecond

DefaultDuration is the OS's default notification duration.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

type Notification struct {
	Title      string
	Body       string
	AppName    string
	IconPath   string
	Duration   time.Duration // 0 means notification must be dismissed manually
	ReplacesID NotificationID
}

A Notification represents a notification to be shown to the user. Only the Title field is required.

type NotificationID

type NotificationID uint32

NotificationID uniquely identifies a notification.

func Push

Push displays a notification. It returns a NotificationID that can be used to replace the notification later.

Source Files

Jump to

Keyboard shortcuts

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