clipboard

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MaxOSC52EncodedLength = 100_000

Variables

This section is empty.

Functions

func CopyToClipboard

func CopyToClipboard(text string) error

func EmitOSC52

func EmitOSC52(text string, output io.Writer) bool

func ExtensionForImageMimeType

func ExtensionForImageMimeType(mimeType string) string

ExtensionForImageMimeType returns the file extension for a supported image MIME type, or "" for unsupported types (upstream returns null).

func IsWaylandSession

func IsWaylandSession(getenv func(string) string) bool

Types

type Image

type Image struct {
	Bytes    []byte
	MimeType string
}

Image is upstream utils/clipboard-image.ts ClipboardImage.

func ReadImage

func ReadImage() *Image

ReadImage ports upstream readClipboardImage. The native-clipboard addon path (the only source on darwin and win32, and a Linux X11 fallback) has no pure-Go equivalent per D7, so those steps return nil; the Linux command paths are ported in upstream order.

Jump to

Keyboard shortcuts

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