1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-01-18 13:07:58 +00:00
rolens/internal/ui/ui.go

28 lines
343 B
Go
Raw Permalink Normal View History

2023-02-21 16:47:21 +00:00
package ui
import (
"context"
"runtime"
"github.com/gen2brain/beeep"
)
type UI struct {
2023-05-26 15:21:39 +00:00
ctx context.Context
2023-02-21 16:47:21 +00:00
}
func New() *UI {
2023-12-22 14:26:29 +00:00
return &UI{}
2023-02-21 16:47:21 +00:00
}
func (u *UI) Startup(ctx context.Context) {
u.ctx = ctx
}
func (u *UI) Beep() {
if runtime.GOOS == "windows" {
return
}
beeep.Beep(beeep.DefaultFreq, beeep.DefaultDuration)
}