Add title setting
Some checks reported errors
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build was killed

This commit is contained in:
IamTheFij 2024-10-24 10:08:15 -07:00
parent 6d5cd3bad5
commit c0f979a48a

View File

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