aboutsummaryrefslogtreecommitdiff
path: root/notify_osx.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-12 02:37:22 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-12 02:37:22 +0200
commitf00cb4ada824714c238e6f78fe5f932b1c010f00 (patch)
tree2efa0bedd4eae6549ae395dc714736da411877e7 /notify_osx.go
parentf013d67855055d7f56fb39134d988316554ca771 (diff)
Add notifications
Diffstat (limited to 'notify_osx.go')
-rw-r--r--notify_osx.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/notify_osx.go b/notify_osx.go
new file mode 100644
index 0000000..2e427e9
--- /dev/null
+++ b/notify_osx.go
@@ -0,0 +1,13 @@
+// +build darwin
+
+package main
+
+import (
+ "fmt"
+ "os/exec"
+)
+
+func notify(s string) error {
+ cmd := fmt.Sprintf("display notification %q with title %q", s, "Pomodoro")
+ return exec.Command("osascript", "-e", cmd).Run()
+}