Raxol.System.Clipboard (Raxol v0.3.0)
View SourceProvides consolidated access to the system clipboard across different operating systems.
Handles interactions with platform-specific clipboard utilities like pbcopy
/pbpaste
(macOS),
xclip
(Linux/X11), and clip
/powershell Get-Clipboard
(Windows).
Requires xclip
to be installed on Linux systems using X11.
Wayland clipboard access might require different utilities not currently handled.
Summary
Functions
Copies the given text to the system clipboard.
Retrieves text from the system clipboard.
Returns {:ok, text}
on success, or {:error, reason}
on failure.
An empty clipboard is considered success and returns {:ok, ""}
.