Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SessionBusSync ¶ added in v0.1.0
func SessionBusSync() (*gio.DBusConnection, error)
SessionBusSync gets the global session bus.
Types ¶
type MPRISWatcher ¶ added in v0.0.4
type MPRISWatcher struct { *gio.DBusConnection OnPlayback func(m Metadata, playing bool) // contains filtered or unexported fields }
MPRISWatcher wraps around a GIO DBus Connection to listen to the system's MPRIS events.
func NewMPRISWatcher ¶ added in v0.0.4
func NewMPRISWatcher(c *gio.DBusConnection) *MPRISWatcher
NewMPRISWatcher creates a new MPRIS watcher instance.
func (*MPRISWatcher) Close ¶ added in v0.1.0
func (w *MPRISWatcher) Close()
Close stops the watcher.
func (*MPRISWatcher) IsEnabled ¶ added in v0.0.4
func (w *MPRISWatcher) IsEnabled() bool
func (*MPRISWatcher) SetEnabled ¶ added in v0.0.4
func (w *MPRISWatcher) SetEnabled(enabled bool)
type Metadata ¶ added in v0.0.4
Metadata maps some fields from https://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata/#index5h3
type Notification ¶
type Notifier ¶
type Notifier struct { *gio.DBusConnection // contains filtered or unexported fields }
Notifier wraps around a GIO DBus Connection and allows sending notifications using the DBus method.
func NewNotifier ¶
func NewNotifier(c *gio.DBusConnection) *Notifier
NewNotifier creates a new notifier.
Click to show internal directories.
Click to hide internal directories.