feat: update terminology from "Work" to "Focus"
- change "Work" to "Focus" in all occurences - update GoTomato version to v0.4.0
This commit is contained in:
parent
646f460e6a
commit
a121f01371
5 changed files with 10 additions and 10 deletions
|
@ -15,7 +15,7 @@ The configuration is loaded from `~/config/ChronoTomato.yml`, here is an example
|
||||||
url: ws://localhost:8080/ws
|
url: ws://localhost:8080/ws
|
||||||
password: ""
|
password: ""
|
||||||
config:
|
config:
|
||||||
work: 1500
|
focus: 1500
|
||||||
shortbreak: 300
|
shortbreak: 300
|
||||||
longbreak: 600
|
longbreak: 600
|
||||||
sessions: 4
|
sessions: 4
|
||||||
|
|
|
@ -19,8 +19,8 @@ func desktopNotifications(pomodoro GoTomato.ServerMessage) {
|
||||||
sessions := pomodoro.Settings.Sessions
|
sessions := pomodoro.Settings.Sessions
|
||||||
|
|
||||||
switch mode {
|
switch mode {
|
||||||
case "Work":
|
case "Focus":
|
||||||
duration = pomodoro.Settings.Work
|
duration = pomodoro.Settings.Focus
|
||||||
notification = fmt.Sprintf("Session %d/%d: %s %0.f minutes", session, sessions, mode, float32(duration)/60)
|
notification = fmt.Sprintf("Session %d/%d: %s %0.f minutes", session, sessions, mode, float32(duration)/60)
|
||||||
case "ShortBreak":
|
case "ShortBreak":
|
||||||
duration = pomodoro.Settings.ShortBreak
|
duration = pomodoro.Settings.ShortBreak
|
||||||
|
|
|
@ -43,8 +43,8 @@ func terminalOutput(pomodoro GoTomato.ServerMessage) string {
|
||||||
)
|
)
|
||||||
|
|
||||||
// header
|
// header
|
||||||
output += colour.Sprintf("^D^4Work: %d ◊ Break: %d ◊ Longbreak: %d^R\n\n",
|
output += colour.Sprintf("^D^4Focus: %d ◊ Break: %d ◊ Longbreak: %d^R\n\n",
|
||||||
pomodoro.Settings.Work/60,
|
pomodoro.Settings.Focus/60,
|
||||||
pomodoro.Settings.ShortBreak/60,
|
pomodoro.Settings.ShortBreak/60,
|
||||||
pomodoro.Settings.LongBreak/60,
|
pomodoro.Settings.LongBreak/60,
|
||||||
)
|
)
|
||||||
|
@ -80,8 +80,8 @@ func calc_percentage(message GoTomato.ServerMessage) float64 {
|
||||||
var duration float64
|
var duration float64
|
||||||
|
|
||||||
switch message.Mode {
|
switch message.Mode {
|
||||||
case "Work":
|
case "Focus":
|
||||||
duration = float64(message.Settings.Work)
|
duration = float64(message.Settings.Focus)
|
||||||
case "ShortBreak":
|
case "ShortBreak":
|
||||||
duration = float64(message.Settings.ShortBreak)
|
duration = float64(message.Settings.ShortBreak)
|
||||||
case "LongBreak", "End":
|
case "LongBreak", "End":
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -3,7 +3,7 @@ module git.smsvc.net/pomodoro/ChronoTomato
|
||||||
go 1.23.1
|
go 1.23.1
|
||||||
|
|
||||||
require (
|
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/alecthomas/colour v0.1.0
|
||||||
github.com/charmbracelet/bubbles v0.20.0
|
github.com/charmbracelet/bubbles v0.20.0
|
||||||
github.com/charmbracelet/bubbletea v1.2.2
|
github.com/charmbracelet/bubbletea v1.2.2
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -1,5 +1,5 @@
|
||||||
git.smsvc.net/pomodoro/GoTomato v0.3.1 h1:0YUOqwluUlnx1PLQiXCxRuNwejcE/IkNOD1SuCObyUA=
|
git.smsvc.net/pomodoro/GoTomato v0.4.0 h1:IBE0J6linmFWcqzl8hx538RGJ7r7088UZJanoXhmtwQ=
|
||||||
git.smsvc.net/pomodoro/GoTomato v0.3.1/go.mod h1:LaKrPdnFB5v4RpltExKasW67TmjJlmhDDvmoEYWv0P4=
|
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 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk=
|
||||||
github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0=
|
github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0=
|
||||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
|
||||||
|
|
Loading…
Reference in a new issue