From e0298521c6c12c5f347431bfad5b6a4d7ab8b465 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 26 Mar 2018 18:04:10 +0300 Subject: Add sounds to notifications --- notification/notify_darwin.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'notification/notify_darwin.go') diff --git a/notification/notify_darwin.go b/notification/notify_darwin.go index 1d9cbbc..1e09ef8 100644 --- a/notification/notify_darwin.go +++ b/notification/notify_darwin.go @@ -31,7 +31,7 @@ func init() { TerminalNotifierAvailable = true } -func Send(title, text string, critical bool) error { +func Send(title, text string, critical, sound bool) error { if TerminalNotifierAvailable { args := []string{"-title", "gomuks", "-subtitle", title, "-message", text} if critical { @@ -39,6 +39,9 @@ func Send(title, text string, critical bool) error { } else { args = append(args, "-timeout", "4") } + if sound { + args = append(args, "-sound", "default") + } // if len(iconPath) > 0 { // args = append(args, "-appIcon", iconPath) // } -- cgit v1.2.3