feat: hide cursor

This commit is contained in:
Sebastian Mark 2024-10-23 13:58:17 +02:00
parent ef0f940343
commit d731fc3e52
3 changed files with 5 additions and 0 deletions

1
go.mod
View file

@ -3,6 +3,7 @@ module ChronoTomato
go 1.23.1
require (
atomicgo.dev/cursor v0.2.0
atomicgo.dev/keyboard v0.2.9
git.smsvc.net/pomodoro/GoTomato v0.0.0-20241022065122-cb6616f400db
github.com/charmbracelet/log v0.4.0

2
go.sum
View file

@ -1,3 +1,5 @@
atomicgo.dev/cursor v0.2.0 h1:H6XN5alUJ52FZZUkI7AlJbUc1aW38GWZalpYRPpoPOw=
atomicgo.dev/cursor v0.2.0/go.mod h1:Lr4ZJB3U7DfPPOkbH7/6TOtJ4vFGHlgj1nc+n900IpU=
atomicgo.dev/keyboard v0.2.9 h1:tOsIid3nlPLZ3lwgG8KZMp/SFmr7P0ssEN5JUsm78K8=
atomicgo.dev/keyboard v0.2.9/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ=
git.smsvc.net/pomodoro/GoTomato v0.0.0-20241022065122-cb6616f400db h1:KLq83XCEgM7f2BFRBX4IPlg73ASqlI85Ib5qLb0GDw0=

View file

@ -2,6 +2,7 @@ package notifications
import (
"ChronoTomato/internal/shared"
"atomicgo.dev/cursor"
"fmt"
"github.com/fatih/color"
"strings"
@ -12,6 +13,7 @@ func TerminalOutput() {
pomodoro := &shared.ServerMessage
cursor.Hide()
fmt.Print("\033[H\033[2J") // Clears the screen
color.Blue("Work: %d | Break: %d | Longbreak: %d\n\n",