File: notification.go

package info (click to toggle)
golang-dbus 3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch, stretch-backports
  • size: 368 kB
  • ctags: 487
  • sloc: sh: 41; makefile: 6
file content (17 lines) | stat: -rw-r--r-- 449 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package main

import "github.com/godbus/dbus"

func main() {
	conn, err := dbus.SessionBus()
	if err != nil {
		panic(err)
	}
	obj := conn.Object("org.freedesktop.Notifications", "/org/freedesktop/Notifications")
	call := obj.Call("org.freedesktop.Notifications.Notify", 0, "", uint32(0),
		"", "Test", "This is a test of the DBus bindings for go.", []string{},
		map[string]dbus.Variant{}, int32(5000))
	if call.Err != nil {
		panic(call.Err)
	}
}