aboutsummaryrefslogtreecommitdiff
path: root/notification/notify_darwin.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-03-26 18:04:10 +0300
committerTulir Asokan <tulir@maunium.net>2018-03-26 18:04:10 +0300
commite0298521c6c12c5f347431bfad5b6a4d7ab8b465 (patch)
tree317a7e635eab0badefdf632d0a308980ead66d1b /notification/notify_darwin.go
parentb31d96881432ebb1d4918ae970fabfd6362e1186 (diff)
Add sounds to notifications
Diffstat (limited to 'notification/notify_darwin.go')
-rw-r--r--notification/notify_darwin.go5
1 files changed, 4 insertions, 1 deletions
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)
// }