summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-25 23:10:38 +0300
committerPaul Buetow <paul@buetow.org>2025-06-25 23:10:38 +0300
commit2e74f80bdb12ac5cb9c9e30e9878bb594c03e5df (patch)
tree6c324110869b35e0e51e46a3ba3b421cd6bb78ff /cmd
parent7e7a0ce7996d877984085180395694495c02b830 (diff)
feat: Implement live timer view
Diffstat (limited to 'cmd')
-rw-r--r--cmd/timr/main.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/cmd/timr/main.go b/cmd/timr/main.go
index fc3407a..534275b 100644
--- a/cmd/timr/main.go
+++ b/cmd/timr/main.go
@@ -4,6 +4,8 @@ import (
"fmt"
"os"
+ "github.com/charmbracelet/bubbletea"
+ "timr/internal/live"
"timr/internal/timer"
)
@@ -25,6 +27,13 @@ func main() {
output, err = timer.GetStatus()
case "reset":
output, err = timer.ResetTimer()
+ case "live":
+ p := tea.NewProgram(live.NewModel())
+ if err := p.Start(); err != nil {
+ fmt.Println("Error running program:", err)
+ os.Exit(1)
+ }
+ return
default:
printUsage()
os.Exit(1)
@@ -38,5 +47,5 @@ func main() {
}
func printUsage() {
- fmt.Println("Usage: timr <start|stop|pause|status|reset>")
+ fmt.Println("Usage: timr <start|stop|pause|status|reset|live>")
}