Add notifications and info page
This commit is contained in:
BIN
internal/notify/info.png
Executable file
BIN
internal/notify/info.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
16
internal/notify/notify.go
Normal file
16
internal/notify/notify.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package notify
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
|
||||
"github.com/gen2brain/beeep"
|
||||
)
|
||||
|
||||
//go:embed info.png
|
||||
var icon []byte
|
||||
|
||||
// Show shows a desktop notification if possible.
|
||||
// It must never panic and callers should treat it as fire-and-forget.
|
||||
func Show(title, message string) {
|
||||
_ = beeep.Notify(title, message, icon)
|
||||
}
|
||||
Reference in New Issue
Block a user