// Package clipboard provides unified clipboard read/write across Linux, Windows, and macOS. // // On Linux, it auto-detects X11 (xclip) vs Wayland (wl-clipboard) by checking // $XDG_SESSION_TYPE and verifying the required binaries at initialization time. // On Windows, it uses the Win32 clipboard API via syscall (no CGo). // On macOS, it shells out to pbpaste / pbcopy. // // Each platform file defines its own New() constructor using //go:build tags. package clipboard // Clipboard is the cross-platform clipboard interface. type Clipboard interface { // Read returns the current text content of the clipboard. // Returns an empty string if the clipboard is empty or contains non-text data. Read() (string, error) // Write sets the clipboard text content. Write(text string) error }