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.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()
|
||||||
|
Loading…
Reference in New Issue
Block a user