From a121f013714511565830336241b5bceb5a26782b Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Mon, 18 Nov 2024 19:24:03 +0100 Subject: [PATCH] feat: update terminology from "Work" to "Focus" - change "Work" to "Focus" in all occurences - update GoTomato version to v0.4.0 --- README.md | 2 +- cmd/client/notification.go | 4 ++-- cmd/client/view.go | 8 ++++---- go.mod | 2 +- go.sum | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 71b0918..c03c07c 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The configuration is loaded from `~/config/ChronoTomato.yml`, here is an example url: ws://localhost:8080/ws password: "" config: - work: 1500 + focus: 1500 shortbreak: 300 longbreak: 600 sessions: 4 diff --git a/cmd/client/notification.go b/cmd/client/notification.go index 7e5dfd6..5199c82 100644 --- a/cmd/client/notification.go +++ b/cmd/client/notification.go @@ -19,8 +19,8 @@ func desktopNotifications(pomodoro GoTomato.ServerMessage) { sessions := pomodoro.Settings.Sessions switch mode { - case "Work": - duration = pomodoro.Settings.Work + case "Focus": + duration = pomodoro.Settings.Focus notification = fmt.Sprintf("Session %d/%d: %s %0.f minutes", session, sessions, mode, float32(duration)/60) case "ShortBreak": duration = pomodoro.Settings.ShortBreak diff --git a/cmd/client/view.go b/cmd/client/view.go index 0e7d9b9..e11763c 100644 --- a/cmd/client/view.go +++ b/cmd/client/view.go @@ -43,8 +43,8 @@ func terminalOutput(pomodoro GoTomato.ServerMessage) string { ) // header - output += colour.Sprintf("^D^4Work: %d ◊ Break: %d ◊ Longbreak: %d^R\n\n", - pomodoro.Settings.Work/60, + output += colour.Sprintf("^D^4Focus: %d ◊ Break: %d ◊ Longbreak: %d^R\n\n", + pomodoro.Settings.Focus/60, pomodoro.Settings.ShortBreak/60, pomodoro.Settings.LongBreak/60, ) @@ -80,8 +80,8 @@ func calc_percentage(message GoTomato.ServerMessage) float64 { var duration float64 switch message.Mode { - case "Work": - duration = float64(message.Settings.Work) + case "Focus": + duration = float64(message.Settings.Focus) case "ShortBreak": duration = float64(message.Settings.ShortBreak) case "LongBreak", "End": diff --git a/go.mod b/go.mod index a17e81c..0140442 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module git.smsvc.net/pomodoro/ChronoTomato go 1.23.1 require ( - git.smsvc.net/pomodoro/GoTomato v0.3.1 + git.smsvc.net/pomodoro/GoTomato v0.4.0 github.com/alecthomas/colour v0.1.0 github.com/charmbracelet/bubbles v0.20.0 github.com/charmbracelet/bubbletea v1.2.2 diff --git a/go.sum b/go.sum index f34a319..62a1c67 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -git.smsvc.net/pomodoro/GoTomato v0.3.1 h1:0YUOqwluUlnx1PLQiXCxRuNwejcE/IkNOD1SuCObyUA= -git.smsvc.net/pomodoro/GoTomato v0.3.1/go.mod h1:LaKrPdnFB5v4RpltExKasW67TmjJlmhDDvmoEYWv0P4= +git.smsvc.net/pomodoro/GoTomato v0.4.0 h1:IBE0J6linmFWcqzl8hx538RGJ7r7088UZJanoXhmtwQ= +git.smsvc.net/pomodoro/GoTomato v0.4.0/go.mod h1:LaKrPdnFB5v4RpltExKasW67TmjJlmhDDvmoEYWv0P4= github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=