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:
Sebastian Mark 2024-10-23 13:16:30 +02:00
parent 11c599a371
commit 4dcc984784
7 changed files with 107 additions and 9 deletions

2
go.mod
View file

@ -3,6 +3,7 @@ module ChronoTomato
go 1.23.1
require (
atomicgo.dev/keyboard v0.2.9
git.smsvc.net/pomodoro/GoTomato v0.0.0-20241022065122-cb6616f400db
github.com/charmbracelet/log v0.4.0
github.com/gen2brain/beeep v0.0.0-20240516210008-9c006672e7f4
@ -12,6 +13,7 @@ require (
require (
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/charmbracelet/lipgloss v0.10.0 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect