notify

package
v0.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package notify raises a desktop notification through whatever the machine already has.

It shells out — notify-send on Linux and the BSDs, osascript on macOS, PowerShell's toast on Windows — and brings no dependency of its own. A notification library would mean cgo or a Windows API binding, and this tool ships as one static binary with no runtime dependency; a feature that convenient is not worth that.

Every failure is silent by design. There is no notifier in a container, over ssh, or on a headless CI machine, and a board that printed a warning every time it could not pop up a bubble would be worse than one that quietly does not.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() bool

Available reports whether a notifier could be found. Callers use it to skip the work of assembling a message that nothing can show.

func IsWSL added in v0.5.1

func IsWSL() bool

IsWSL reports whether this linux is WSL, where the Windows side is reachable for what the Linux side lacks: a notifier, a browser.

func Send

func Send(title, body string) bool

Send shows a notification. It returns whether anything was shown, for callers that want to fall back to a printed line.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL