MCPcopy Create free account
hub / github.com/efogdev/mpris-timer / sendNotification

Function sendNotification

internal/ui/notify.go:29–41  ·  view source on GitHub ↗
(app *adw.Application, title string, text string)

Source from the content-addressed store, hash-verified

27}
28
29func sendNotification(app *adw.Application, title string, text string) {
30 id, _ := uuid.NewV7()
31 actionName := "app." + id.String()
32 app.AddAction(gio.NewSimpleAction(actionName, nil))
33
34 n := gio.NewNotification(title)
35 n.SetBody(text)
36 n.SetPriority(gio.NotificationPriorityUrgent)
37 n.SetDefaultAction(actionName)
38 n.SetIcon(gio.NewBytesIcon(glib.NewBytes(icon)))
39
40 app.SendNotification(id.String(), n)
41}

Callers 1

NotifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected