Add title setting
This commit is contained in:
parent
6d5cd3bad5
commit
c0f979a48a
8
main.go
8
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()
|
||||
|
Loading…
Reference in New Issue
Block a user