clipboard

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package clipboard is an xclip-backed system clipboard for the editor. It implements editor.Clipboard and is injected in main; the core depends only on the interface, so a Wayland or macOS build would inject a different backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clipboard

type Clipboard struct{}

Clipboard reads and writes the X11 CLIPBOARD selection via xclip, the Ctrl-C/Ctrl-V clipboard. Drop the "-selection clipboard" arguments for the middle-click PRIMARY selection instead.

func New

func New() (*Clipboard, error)

New returns an xclip-backed clipboard, or an error if xclip is not installed.

func (*Clipboard) Read

func (*Clipboard) Read() (string, error)

Read returns the clipboard contents (xclip -selection clipboard -o).

func (*Clipboard) Write

func (*Clipboard) Write(s string) error

Write copies s to the clipboard (xclip -selection clipboard -i).

Jump to

Keyboard shortcuts

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