From 05790c156d0b6a2545b2fc604163255bd259e004 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 19 Sep 2021 20:52:20 -0400 Subject: [PATCH] Run sound command in goroutine so notification shows up at the same time --- lib/notification/notify_xdg.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/notification/notify_xdg.go b/lib/notification/notify_xdg.go index 0807bb2..7f102b8 100644 --- a/lib/notification/notify_xdg.go +++ b/lib/notification/notify_xdg.go @@ -76,7 +76,9 @@ func Send(title, text string, critical, sound bool) error { if critical && len(soundCritical) > 0 { audioFile = soundCritical } - _ = exec.Command(audioCommand, audioFile).Run() + go func() { + _ = exec.Command(audioCommand, audioFile).Run() + }() } return exec.Command(notifySendPath, args...).Run() }