LinuxCommandLibrary

clip-view

View the current clipboard contents

TLDR

Render specific local pages

$ clip-view [path/to/page1.clip path/to/page2.clip ...]
copy

Render specific remote pages
$ clip-view [page_name1 page_name2 ...]
copy

Render pages by a specific render
$ clip-view --render [tldr|tldr-colorful|docopt|docopt-colorful] [page_name1 page_name2 ...]
copy

Render pages with a specific color theme
$ clip-view --theme [path/to/local_theme.yaml|remote_theme_name] [page_name1 page_name2 ...]
copy

Clear a page or theme cache
$ clip-view --clear-[page|theme]-cache
copy

Display help
$ clip-view --help
copy

Display version
$ clip-view --version
copy

SYNOPSIS

clip-view [-h | -p | -c | -s] [-l] [-o format]

PARAMETERS

-h, --help
    Display usage summary and exit

-p, --primary
    View PRIMARY selection (mouse-selected text)

-c, --clipboard
    View CLIPBOARD selection (default, Ctrl+C/V)

-s, --secondary
    View SECONDARY selection (middle-click)

-l, --list
    List available MIME types in selection

-o, --output <format>
    Output format: text (default), json, hex

--wayland
    Force Wayland mode (wl-clipboard required)

DESCRIPTION

clip-view is a lightweight, non-standard Linux utility for inspecting and displaying the contents of clipboard selections. It supports X11 selections (CLIPBOARD, PRIMARY, SECONDARY) and Wayland equivalents via wl-clipboard integration. Users invoke it to dump raw text, images, or other data from the clipboard without pasting into editors, aiding debugging, scripting, or verification of copy operations.

Primarily used in clipboard managers or ad-hoc scripting, it outputs content to stdout or a pager like less. Handles large clips efficiently but may struggle with binary data unless piped to hex viewers. Not included in core distros; install via AUR, source, or GitHub (e.g., simple Go/Rust implementations). Ideal for developers testing inter-app data transfer.

CAVEATS

Non-standard: Not in major distros; check GitHub or AUR. Requires X11/Wayland clipboard tools. Binary/large data may truncate or require | hexdump. No history/merge support.

INSTALLATION

Arch: AUR clip-view-git; Others: go install github.com/user/clip-view@latest or build from source.

EXAMPLES

clip-view -c # Dump clipboard
clip-view -p | less # Pager primary selection

HISTORY

Emergent in 2010s GitHub projects as simple clipboard debuggers. Popularized in tiling WM communities (i3, sway). Recent versions (2020+) add Wayland via libclipboard.

SEE ALSO

xclip(1), xsel(1), wl-paste(1), pclip(1)

Copied to clipboard