feat: hide cursor
This commit is contained in:
parent
ef0f940343
commit
d731fc3e52
3 changed files with 5 additions and 0 deletions
1
go.mod
1
go.mod
|
@ -3,6 +3,7 @@ module ChronoTomato
|
||||||
go 1.23.1
|
go 1.23.1
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
atomicgo.dev/cursor v0.2.0
|
||||||
atomicgo.dev/keyboard v0.2.9
|
atomicgo.dev/keyboard v0.2.9
|
||||||
git.smsvc.net/pomodoro/GoTomato v0.0.0-20241022065122-cb6616f400db
|
git.smsvc.net/pomodoro/GoTomato v0.0.0-20241022065122-cb6616f400db
|
||||||
github.com/charmbracelet/log v0.4.0
|
github.com/charmbracelet/log v0.4.0
|
||||||
|
|
2
go.sum
2
go.sum
|
@ -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 h1:tOsIid3nlPLZ3lwgG8KZMp/SFmr7P0ssEN5JUsm78K8=
|
||||||
atomicgo.dev/keyboard v0.2.9/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ=
|
atomicgo.dev/keyboard v0.2.9/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ=
|
||||||
git.smsvc.net/pomodoro/GoTomato v0.0.0-20241022065122-cb6616f400db h1:KLq83XCEgM7f2BFRBX4IPlg73ASqlI85Ib5qLb0GDw0=
|
git.smsvc.net/pomodoro/GoTomato v0.0.0-20241022065122-cb6616f400db h1:KLq83XCEgM7f2BFRBX4IPlg73ASqlI85Ib5qLb0GDw0=
|
||||||
|
|
|
@ -2,6 +2,7 @@ package notifications
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"ChronoTomato/internal/shared"
|
"ChronoTomato/internal/shared"
|
||||||
|
"atomicgo.dev/cursor"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -12,6 +13,7 @@ func TerminalOutput() {
|
||||||
|
|
||||||
pomodoro := &shared.ServerMessage
|
pomodoro := &shared.ServerMessage
|
||||||
|
|
||||||
|
cursor.Hide()
|
||||||
fmt.Print("\033[H\033[2J") // Clears the screen
|
fmt.Print("\033[H\033[2J") // Clears the screen
|
||||||
|
|
||||||
color.Blue("Work: %d | Break: %d | Longbreak: %d\n\n",
|
color.Blue("Work: %d | Break: %d | Longbreak: %d\n\n",
|
||||||
|
|
Loading…
Reference in a new issue