Skip to content

Commit

Permalink
Update service_exec.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilliams0305 committed Dec 21, 2023
1 parent d6e04aa commit 70d4eb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/tui/service_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,17 @@ func (m VirtualControlServiceModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, nil
}

case progress.Model:
m.progress = msg

case progress.FrameMsg:
progressModel, cmd := m.progress.Update(msg)
m.progress = progressModel.(progress.Model)
return m, cmd

case progressTick:
if m.progress.Percent() == 1.0 {
prog := progress.New(progress.WithDefaultGradient())
prog.Width = app.width
m.progress = prog
m.progress.SetPercent(0)
return m, tea.Batch(openJournal(), tea.EnterAltScreen)
}
return m, tea.Batch(systemTickCmd(), m.progress.IncrPercent(0.20))
Expand Down Expand Up @@ -159,7 +160,6 @@ func systemTickCmd() tea.Cmd {
return progressTick(t)
})
}

func openJournal() tea.Cmd {

c := exec.Command("journalctl", "-u", "virtualcontrol.service", "-f")
Expand Down

0 comments on commit 70d4eb4

Please sign in to comment.