feat: add color output to terminal
- add color package for improved terminal output
- update terminal output to use colored text
🤖
This commit is contained in:
parent
98013780da
commit
ef0f940343
3 changed files with 17 additions and 8 deletions
|
@ -3,6 +3,7 @@ package notifications
|
|||
import (
|
||||
"ChronoTomato/internal/shared"
|
||||
"fmt"
|
||||
"github.com/fatih/color"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
@ -13,7 +14,7 @@ func TerminalOutput() {
|
|||
|
||||
fmt.Print("\033[H\033[2J") // Clears the screen
|
||||
|
||||
fmt.Printf("Work: %d | Break: %d | Longbreak: %d\n",
|
||||
color.Blue("Work: %d | Break: %d | Longbreak: %d\n\n",
|
||||
pomodoro.PomodoroSettings.Work/60,
|
||||
pomodoro.PomodoroSettings.ShortBreak/60,
|
||||
pomodoro.PomodoroSettings.LongBreak/60,
|
||||
|
@ -40,5 +41,5 @@ func TerminalOutput() {
|
|||
|
||||
//footer
|
||||
fmt.Printf(strings.Repeat("\n", 3))
|
||||
fmt.Printf("s: start • space: pause/resume • r: stop • q: quit")
|
||||
color.White("s: start • space: pause/resume • r: stop • q: quit")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue