feat: add keyboard controls
- add keyboard listener for space, r, and q keys
- create shared state for server messages
- update desktop and terminal notifications to use shared state
🤖
This commit is contained in:
parent
11c599a371
commit
4dcc984784
7 changed files with 107 additions and 9 deletions
|
@ -1,12 +1,14 @@
|
|||
package notifications
|
||||
|
||||
import (
|
||||
"ChronoTomato/internal/shared"
|
||||
"fmt"
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
"github.com/gen2brain/beeep"
|
||||
)
|
||||
|
||||
func DesktopNotifications(msg models.ServerMessage) {
|
||||
func DesktopNotifications() {
|
||||
msg := &shared.ServerMessage
|
||||
|
||||
var duration int
|
||||
var notification string
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
package notifications
|
||||
|
||||
import (
|
||||
"ChronoTomato/internal/shared"
|
||||
"fmt"
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
)
|
||||
|
||||
func TerminalOutput(msg models.ServerMessage) {
|
||||
func TerminalOutput() {
|
||||
var timerOutput string
|
||||
|
||||
msg := &shared.ServerMessage
|
||||
|
||||
fmt.Print("\033[H\033[2J") // Clears the screen
|
||||
|
||||
fmt.Printf("Work: %d | Break: %d | Longbreak: %d\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue