PrintToVeraeTimeStamp/cmd/verae-print/platform_other.go
George Lambert 48da24a661 feat: 2026 brand UI — statuslang, tray/menubar, CERT pdf, site kit
- Brand receipt status strings (statuslang) for notify/queue
- Windows tray + Start Menu/Startup install; macOS menubar helper
- CERT-01 plum/gold PDF + multihash/blake3 when present
- printit.verae.ai brand kit, queue page, customer-auth helper
- verae-print pending/tray-status/menubar commands
2026-10-13 21:11:32 -04:00

51 lines
1.1 KiB
Go

//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 }