aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-04-25 11:59:18 +0200
committerDimitri Sokolyuk <demon@dim13.org>2018-04-25 11:59:18 +0200
commitdf8f09caf2c88ee815ad31519754486561f4dbf6 (patch)
tree3557035e7a37b4c436ad668c2944353b63ef1dfa
parent5e20c589653f7443cf01a8033f92757a43846c55 (diff)
remove notificationHEADmaster
-rw-r--r--main.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/main.go b/main.go
index 921cc5e..85520dd 100644
--- a/main.go
+++ b/main.go
@@ -5,9 +5,7 @@ import (
"flag"
"fmt"
"os"
- "os/exec"
"os/signal"
- "runtime"
"strings"
"time"
)
@@ -64,7 +62,6 @@ func (o *Opt) longBreak(ctx context.Context) stateFn {
}
func (o *Opt) display(ctx context.Context, s string) {
- go notify("Pomodoro timer", s)
dl, ok := ctx.Deadline()
if !ok {
return
@@ -99,21 +96,6 @@ func progress(total, left time.Duration) string {
return s
}
-func notify(title, s string) error {
- s = time.Now().Format(time.Kitchen) + " " + s
- switch runtime.GOOS {
- case "darwin":
- msg := fmt.Sprintf("display notification %q with title %q", s, title)
- return exec.Command("osascript", "-e", msg).Run()
- case "linux":
- msg := fmt.Sprintf("%s", s)
- return exec.Command("notify-send", title, msg).Run()
- default: // *BSD
- msg := fmt.Sprintf("%s\n%s", title, s)
- return exec.Command("xmessage", "-center", "-timeout", "5", msg).Run()
- }
-}
-
func round(d time.Duration) time.Duration { return d - d%time.Second }
func main() {