notify

package
v0.0.0-...-c27737a Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package notify interfaces with dbus to listen to all incoming notifications. The package only supports one notification at a time, and would discard the last one if it receives a new one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen() (chan *Notification, error)

Listen returns the channel which would be filled with either the notification itself or nil if it wants to close the old notification.

Types

type Notification

type Notification struct {
	Application string

	Title string
	Body  string
	Icon  string

	// Defaults to UrgencyNormal
	Urgency Urgency

	// Value shows progress
	Value *int32

	Timeout time.Duration
}

Notification is the struct of a notification

type Urgency

type Urgency uint8

Urgency is the constant for the urgency of a notification

const (
	UrgencyMinimum Urgency = iota
	UrgencyLow
	UrgencyNormal
	UrgencyCritical
	UrgencyMax
)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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