Documentation ¶
Overview ¶
Package notify implements Go bindings for libnotify to create, send, and update OS level notifications. It does not shell out to `notify-send` so it can update existing notifications as well as create new ones.
This package requires Cgo and the libnotify (libnotify-dev) shared library to be installed.
On Ubuntu or Debian you can install with: sudo apt-get install libnotify-dev
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification struct {
// contains filtered or unexported fields
}
Notification represents an instance of a single notification
func (*Notification) Close ¶
func (n *Notification) Close() error
Close removes the notification from the OS
func (*Notification) SetUrgency ¶
func (n *Notification) SetUrgency(urgency Urgency) error
SetUrgency sets the notification urgency (Low, Normal, Critical)
func (*Notification) Show ¶
func (n *Notification) Show() error
Show sends the notification to the OS for displaying
func (*Notification) Update ¶
func (n *Notification) Update(summary, body, icon string) error
Update an existing notification with new information
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier is an instance of an application sending notifications
func NewNotifier ¶
NewNotifier initializes a new application to send notifications. It's required to call this function first.
func (*Notifier) ApplicationName ¶
ApplicationName returns the current application's initialized name
func (*Notifier) NewNotification ¶
func (n *Notifier) NewNotification(summary, body, icon string) (*Notification, error)
NewNotification creates a new notification