GitXplorerGitXplorer
S

clipboard-history

public
205 stars
7 forks
11 issues

Commits

List of commits on branch master.
Verified
be6622dcf5dfca09bde29eef76c16492c7ec2af6

So turns out the previous approach didn't work for pasting with the TUI because you don't change input focus. Try using the foreign toplevel protocol

SSUPERCILEX committed 6 days ago
Verified
643738cbb51f4eccdbfbc530226bfdabadde3ea6

Get wayland auto-paste to work reliably

SSUPERCILEX committed 6 days ago
Verified
f11cdda9405812f6e1e2e2356f19c1d2da6cf71c

Fix clippy lints

SSUPERCILEX committed 6 days ago
Verified
b62abea0f7bd496c4df7ed7095bc9f147bdaa2a7

Get rid of pending seat buffer and use callbacks instead

SSUPERCILEX committed 6 days ago
Verified
3b213ae7b6a01e83cfe0ff973f8e16a9247deef6

Add slightly hacky auto paste functionality

SSUPERCILEX committed 6 days ago
Verified
247fd4075b14b352368da22d57bcdcc99c48eed5

Ignore pipe errors transferring data to clients in wayland watcher

SSUPERCILEX committed 6 days ago

README

The README file for this repository.

Ringboard

Ringboard is a fast, efficient, and composable clipboard manager for Linux.

Basic features:

  • Ringboard remembers what you've copied across reboots.
  • Ringboard can save anything, including images or arbitrary bytes.
  • Your clipboard history is searchable with either Regex or raw queries.
  • Ringboard can be installed anywhere (on Linux) and has no ties to a specific desktop environment or framework.

Differentiators:

  • Ringboard is efficient: it uses a custom binary format to save space on disk, io_uring to avoid allocations and be fast with just a single thread, and mmap to require minimal working set memory.
  • Ringboard is fast and scalable: it was architected to load only the data needed, when needed. For example, displaying the last 100 most recent clipboard entries requires loading just those 100 entries. Ringboard can support up to ~1 million saved clipboard entries. If you copied 100 things every day, it would still take almost 30 years before old entries are overwritten.
  • Ringboard is composable: it uses a client server architecture to support any app modifying or reading data. For example, you can add data via a CLI or an X11 or Wayland clipboard watcher. Different GUIs can each display the clipboard as they wish, enabling deep integration with desktop environments.

A detailed technical breakdown of the project is available at https://alexsaveau.dev/blog/ringboard.

Demo

A screenshot demo-ing the various clients.

Installation instructions

Note: Ringboard is Linux-only and requires a relatively recent Kernel (6+).

The easiest way to get going is to install cargo with nightly and then run the installation script for systemd:

rustup install nightly # If not already installed
curl -s https://raw.githubusercontent.com/SUPERCILEX/clipboard-history/master/install-with-cargo-systemd.sh | bash

Additionally, consider using https://github.com/nabijaczleweli/cargo-update to update your cargo apps or re-run the installation script whenever you need to update.

Manual installation

Common core

You'll need the server, an X11 or Wayland clipboard watcher, and a way to view your clipboard:

  1. Install the server from source with cargo install clipboard-history-server --no-default-features --features systemd or download a prebuilt binary.
  2. Determine whether you are using Wayland or X11 with bash -c 'echo $XDG_SESSION_TYPE':
    1. If on Wayland, install from source with cargo install clipboard-history-wayland --no-default-features (prebuild binaries are also available as before).
    2. If on X11, install from source with cargo install clipboard-history-x11 --no-default-features.
  3. Install a client of your choice:
    • egui: cargo install clipboard-history-egui --no-default-features --features wayland/x11
    • ratatui: cargo install clipboard-history-tui
    • CLI: cargo install clipboard-history
  4. Add a custom shortcut to start your GUI. See the egui docs for example.

For systemd

Install the server and X11 or Wayland services into ~/.config/systemd/user and enable them: systemctl --user enable ringboard-{wayland,x11}.

For framework-less systems

You'll need to start the Ringboard server and X11/Wayland clipboard watcher on boot.

Uninstalling

Run

curl -s https://raw.githubusercontent.com/SUPERCILEX/clipboard-history/master/uninstall.sh | bash

Migrating from existing clipboard managers

Tooling is provided to migrate from other clipboard managers. Run:

Project breakdown

Each submodule contains its own README with details on the submodule.

  • cli/: The Ringboard Command Line Interface contains tools for working with the Ringboard database.
  • client-sdk/: The client SDK offers APIs to read and write Ringboard data.
  • core/: The core code shared across many Ringboard crates.
  • egui/: The egui Ringboard client displays clipboard entries in a standard GUI.
  • server/: The Ringboard server writes data to the Ringboard database.
  • tui/: The ratatui Ringboard client displays clipboard entries in your terminal.
  • watcher-utils/: The watcher utils are shared code between the Wayland and X11 watchers.
  • wayland/: The Wayland clipboard watcher sends new clipboard entries to the Ringboard server.
  • wayland-interface-check/: The Wayland interface checker allows the installation script to use the X11 watcher as a fallback if the user's Wayland compositor does not support the necessary interfaces.
  • x11/: The X11 clipboard watcher sends new clipboard entries to the Ringboard server.