Documentation ¶
Index ¶
- func Initialize(m Method) error
- func Read(r Register) (string, error)
- func ReadMulti(r Register, num, ncursors int) (string, error)
- func ValidMulti(r Register, clip string, ncursors int) bool
- func Write(text string, r Register) error
- func WriteMulti(text string, r Register, num int, ncursors int) error
- type Method
- type Register
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
Initialize attempts to initialize the clipboard using the given method
func ValidMulti ¶
ValidMulti checks if the internal multi-clipboard is valid and up-to-date with the system clipboard
Types ¶
type Method ¶
type Method int
const ( // External relies on external tools for accessing the clipboard // These include xclip, xsel, wl-clipboard for linux, pbcopy/pbpaste on Mac, // and Syscalls on Windows. External Method = iota // Terminal uses the terminal to manage the clipboard via OSC 52. Many // terminals do not support OSC 52, in which case this method won't work. Terminal // Internal just manages the clipboard with an internal buffer and doesn't // attempt to interface with the system clipboard Internal )
type Register ¶
type Register int
A Register is a buffer used to store text. The system clipboard has the 'clipboard' and 'primary' (linux-only) registers, but other registers may be used internal to micro.
const ( // ClipboardReg is the main system clipboard ClipboardReg Register = -1 // PrimaryReg is the system primary clipboard (linux only) PrimaryReg = -2 )
Click to show internal directories.
Click to hide internal directories.