//go:build !windows package main import ( "fmt" "os" "os/exec" "runtime" "github.com/VeraeLLC/PrintToVeraeTimeStamp/internal/vlog" ) // notify shows an OS banner. title should be statuslang.NotifyTitle; body NotifyBody. func notify(title, body string) { if os.Getenv("VERAE_NO_NOTIFY") == "1" { return } if title == "" { title = "Verae Timestamp" } if runtime.GOOS == "linux" { if os.Getenv("DISPLAY") != "" || os.Getenv("WAYLAND_DISPLAY") != "" { _ = exec.Command("notify-send", "-a", "Verae Timestamp", title, body).Run() } return } if runtime.GOOS != "darwin" { return } // Brand status string is the notification title (PT-06 / PT-W3). script := fmt.Sprintf(`display notification %q with title %q`, body, title) _ = exec.Command("osascript", "-e", script).Run() } func notifyUser(title, body string) { vlog.Printf("notify: %s — %s", title, body) notify(title, body) } func openFolderPath(p string) { if runtime.GOOS == "darwin" { _ = exec.Command("open", p).Run() return } _ = exec.Command("xdg-open", p).Start() } func runInstallPrinterWindows() int { return 1 } func debugFromRegistry() bool { return false }