File: notify_unix.go

package info (click to toggle)
golang-github-tillitis-tkeyutil 0.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 128 kB
  • sloc: sh: 70; makefile: 10
file content (20 lines) | stat: -rw-r--r-- 386 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-FileCopyrightText: 2023 Tillitis AB <tillitis.se>
// SPDX-License-Identifier: BSD-2-Clause

//go:build unix

package tkeyutil

import (
	"fmt"
	"os"

	"github.com/gen2brain/beeep"
)

func Notify(progname, msg string) {
	// Using progname as title
	if err := beeep.Notify(progname, msg, ""); err != nil {
		fmt.Fprintf(os.Stderr, "Notify message %q failed: %s\n", msg, err)
	}
}