All Projects → bugaevc → Wl Clipboard

bugaevc / Wl Clipboard

Licence: gpl-3.0
Command-line copy/paste utilities for Wayland

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Wl Clipboard

Clipman
A simple clipboard manager for Wayland
Stars: ✭ 182 (-61.03%)
Mutual labels:  wayland, clipboard
Gotem
Copy to clipboard for modern browsers in less than 1kb.
Stars: ✭ 439 (-6%)
Mutual labels:  clipboard
Brightnessctl
A program to read and control device brightness
Stars: ✭ 306 (-34.48%)
Mutual labels:  wayland
Copyq
Clipboard manager with advanced features
Stars: ✭ 4,346 (+830.62%)
Mutual labels:  clipboard
Farge
Click on a pixel on your screen and show its color value
Stars: ✭ 307 (-34.26%)
Mutual labels:  wayland
Slurp
Select a region in a Wayland compositor
Stars: ✭ 350 (-25.05%)
Mutual labels:  wayland
Wsl Ssh Agent
Helper to interface with Windows ssh-agent.exe service from Windows Subsystem for Linux (WSL)
Stars: ✭ 298 (-36.19%)
Mutual labels:  clipboard
Clipboard Copy
Lightweight copy to clipboard for the web
Stars: ✭ 443 (-5.14%)
Mutual labels:  clipboard
Wayland Rs
Rust implementation of the wayland protocol (client and server).
Stars: ✭ 429 (-8.14%)
Mutual labels:  wayland
Dotfiles
Sway acid dark
Stars: ✭ 330 (-29.34%)
Mutual labels:  wayland
Rofimoji
An emoji and character picker for rofi 😁
Stars: ✭ 319 (-31.69%)
Mutual labels:  wayland
Wob
A lightweight overlay volume/backlight/progress/anything bar for Wayland.
Stars: ✭ 306 (-34.48%)
Mutual labels:  wayland
Cage
A Wayland kiosk
Stars: ✭ 372 (-20.34%)
Mutual labels:  wayland
Clipjump
📋 Clipboard Manager for Windows, built in AutoHotkey
Stars: ✭ 305 (-34.69%)
Mutual labels:  clipboard
Ngx Clipboard
A pure angular clipboard directive
Stars: ✭ 440 (-5.78%)
Mutual labels:  clipboard
Wdisplays
GUI display configurator for wlroots compositors
Stars: ✭ 302 (-35.33%)
Mutual labels:  wayland
Extrakto
tmux - quickly select, copy/insert/complete text without a mouse
Stars: ✭ 320 (-31.48%)
Mutual labels:  clipboard
Clip
Cross-platform C++ library to copy/paste clipboard content
Stars: ✭ 341 (-26.98%)
Mutual labels:  clipboard
Gpaste
Clipboard management system
Stars: ✭ 465 (-0.43%)
Mutual labels:  clipboard
Clipper
✂️ Clipboard access for local and remote tmux sessions
Stars: ✭ 439 (-6%)
Mutual labels:  clipboard

wl-clipboard: Wayland clipboard utilities

This project implements two command-line Wayland clipboard utilities, wl-copy and wl-paste, that let you easily copy data between the clipboard and Unix pipes, sockets, files and so on.

Usage is as simple as:

# copy a simple text message
$ wl-copy Hello world!

# copy the list of files in Downloads
$ ls ~/Downloads | wl-copy

# copy an image file
$ wl-copy < ~/Pictures/photo.png

# paste to a file
$ wl-paste > clipboard.txt

# grep each pasted word in file source.c
$ for word in $(wl-paste); do grep $word source.c; done

# copy the previous command
$ wl-copy "!!"

# replace the current selection with the list of types it's offered in
$ wl-paste --list-types | wl-copy

Although wl-copy and wl-paste are particularly optimized for plain text and other textual content formats, they fully support content of arbitrary MIME types. wl-copy automatically infers the type of the copied content by running xdg-mime(1) on it. wl-paste tries its best to pick a type to paste based on the list of offered MIME types and the extension of the file it's pasting into. If you're not satisfied with the type they pick or don't want to rely on this implicit type inference, you can explicitly specify the type to use with the --type option.

Options

For wl-copy:

  • -n, --trim-newline Do not copy the trailing newline character if it is present in the input file.
  • -o, --paste-once Only serve one paste request and then exit. Unless a clipboard manager specifically designed to prevent this is in use, this has the effect of clearing the clipboard after the first paste, which is useful for copying sensitive data such as passwords. Note that this may break pasting into some clients, in particular pasting into XWayland windows is known to break when this option is used.
  • -f, --foreground By default, wl-copy forks and serves data requests in the background; this option overrides that behavior, causing wl-copy to run in the foreground.
  • -c, --clear Instead of copying anything, clear the clipboard so that nothing is copied.

For wl-paste:

  • -n, --no-newline Do not append a newline character after the pasted clipboard content. This option is automatically enabled for non-text content types and when using the --watch mode.
  • -l, --list-types Instead of pasting the selection, output the list of MIME types it is offered in.
  • -w command..., --watch command... Instead of pasting once and exiting, continuously watch the clipboard for changes, and run the specified command each time a new selection appears. The spawned process can read the clipboard contents from its standard input. This mode requires a compositor that supports the wlroots data-control protocol.

For both:

  • -p, --primary Use the "primary" clipboard instead of the regular clipboard.
  • -t mime/type, --type mime/type Override the inferred MIME type for the content. For wl-copy this option controls which type wl-copy will offer the content as. For wl-paste it controls which of the offered types wl-paste will request the content in. In addition to specific MIME types such as image/png, wl-paste also accepts generic type names such as text and image which make it automatically pick some offered MIME type that matches the given generic name.
  • -s seat-name, --seat seat-name Specify which seat wl-copy and wl-paste should work with. Wayland natively supports multi-seat configurations where each seat gets its own mouse pointer, keyboard focus, and among other things its own separate clipboard. The name of the default seat is likely default or seat0, and additional seat names normally come form udev(7) property ENV{WL_SEAT}. You can view the list of the currently available seats as advertised by the compositor using the weston-info(1) tool. If you don't specify the seat name explicitly, wl-copy and wl-paste will pick a seat arbitrarily. If you are using a single-seat system, there is little reason to use this option.
  • -v, --version Display the version of wl-clipboard and some short info about its license.
  • -h, --help Display a short help message listing the available options.

Building

wl-clipboard is a simple Meson project, so building it is just:

# clone
$ git clone https://github.com/bugaevc/wl-clipboard.git
$ cd wl-clipboard

# build
$ meson build
$ cd build
$ ninja

# install
$ sudo ninja install

wl-clipboard supports Linux and BSD systems, and is also known to work on Mac OS X and GNU Hurd. The only mandatory dependency is the wayland-client library (try package named wayland-devel or libwayland-dev).

Optional dependencies for building:

  • wayland-scanner
  • wayland-protocols (version 1.12 or later)

If these are found during configuration, wl-clipboard gets built with additional protocols support, which enables features such as primary selection support and --watch mode.

Optional dependencies for running:

  • xdg-mime for content type inference in wl-copy (try package named xdg-utils)
  • /etc/mime.types file for type inference in wl-paste (try package named mime-support or mailcap)

License

wl-clipboard is free software, available under the GNU General Public License version 3 or later.

Related projects

  • wl-clipboard-x11: A wrapper to use wl-clipboard as a drop-in replacement to X11 clipboard tools.
  • wl-clipboard-rs: A Rust crate (library) for working with the Wayland clipboard which includes a reimplementation of wl-copy and wl-paste.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].