diff --git a/main.go b/main.go index 5e4907c..7496604 100644 --- a/main.go +++ b/main.go @@ -294,7 +294,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.state = "Focus" m.startCommands(m.onFocusStart) - return m, tick() + cmds = append(cmds, tick()) case timeMsg: // Handle timer update for each second @@ -326,17 +326,17 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { // Run onFocusStart commands m.startCommands(m.onFocusStart) } - - return m, tick() } - return m, tick() + cmds = append(cmds, tick()) case tea.WindowSizeMsg: m.width = msg.Width m.height = msg.Height } + cmds = append(cmds, tea.SetWindowTitle(fmt.Sprintf("Gomodoro - %s", m.state))) + // Get errors from shellrunner for { result := m.shellrunner.GetResults()