mirror of
https://github.com/garraflavatra/rolens.git
synced 2024-11-28 21:13:52 +01:00
28 lines
343 B
Go
28 lines
343 B
Go
package ui
|
|
|
|
import (
|
|
"context"
|
|
"runtime"
|
|
|
|
"github.com/gen2brain/beeep"
|
|
)
|
|
|
|
type UI struct {
|
|
ctx context.Context
|
|
}
|
|
|
|
func New() *UI {
|
|
return &UI{}
|
|
}
|
|
|
|
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)
|
|
}
|