A modern Wayland clipboard manager built with Rust, GTK4, Libadwaita, and Wayland Layer Shell that makes clipboard handling more reliable. Features a Windows 11–style clipboard history interface with native GNOME design, which is always positioned at the current mouse pointer location.
- Clean list interface: Similar to Windows 11 clipboard history
- Content type indicators: Icons for text, URLs, code, files, etc.
- Rich previews: Formatted content display for text, images, and file paths
- Timestamps: When each item was copied
- Quick selection: Click any item to copy it back to the clipboard
- Pin or delete items: Manage your history with ease
- Instant paste: Option to immediately paste the selected item into the active application
- Persistent history: Option to store clipboard history across sessions with automatic encryption
- Layer Shell Protocol: Proper overlay positioning above all windows
- Precise Cursor Tracking: Real-time mouse position detection
- Multi-output Support: Works across multiple monitors
- Multi-input Support: Fully controllable with mouse and keyboard
- Libadwaita styling: Follows GNOME Human Interface Guidelines
- Native widgets: HeaderBar, ListBox, ScrolledWindow
- Stores copied items in memory or in a persistent database and removes duplicates.
- Automatic classification of content types:
- 📝 Text
- 🔗 URLs
- 💻 Code
- 🔒 Passwords
- 📁 File paths
- 🖼️ Images
Showcase-Cursor-Clip.mp4
-
The backend uses
zwlr_data_control_manager_v1to automatically monitor and set clipboard content. -
The frontend uses
zwlr_layer_shell_v1to retrieve pointer coordinates and show the overlay. -
Supported compositors (must support both protocols):
- KDE Plasma (Wayland session)
- Hyprland
- Sway
- niri
- Labwc
- Other wlroots-based compositors
-
Although the application uses GNOME styling and follows the GNOME HIG, GNOME Shell is unfortunately NOT SUPPORTED. It does not implement the required Wayland protocols (
zwlr_layer_shell_v1andzwlr_data_control_manager_v1) needed for Cursor Clip's key features. Future support is not impossible but will require major code and workflow changes and a separate GNOME Extension.
- Wayland compositor, GTK4, gtk4-layer-shell, libadwaita, Rust
You can install Cursor Clip from the AUR using an AUR helper like yay:
yay -S cursor-clip-gitsudo pacman -S gtk4 libadwaita gtk4-layer-shellsudo apt update
sudo apt install build-essential pkg-config libgtk-4-dev libadwaita-1-dev libgtk4-layer-shell-devsudo dnf install gtk4-devel libadwaita-devel gtk4-layer-shell# Clone the repository
git clone https://github.com/Sirulex/cursor-clip
cd cursor-clip
# Build in release mode
cargo build --releaseBuild a containerized version that includes all dependencies:
# Build the Docker image and install the binary
docker build -t cursor-clip .
docker create --name cursor-clip-temp cursor-clip
sudo docker cp cursor-clip-temp:/output/cursor-clip /usr/local/bin/
sudo docker cp cursor-clip-temp:/output/libgtk4-layer-shell.so* /usr/local/lib/
docker rm cursor-clip-temp
# Update library cache and run
sudo ldconfig
cursor-clip --daemon# Build and install using Nix Flakes (default package)
nix build .
# or: nix build .#default
sudo cp result/bin/cursor-clip /usr/local/bin/
# Optional: enter the development shell
nix develop- Start Background Daemon:
cursor-clip --daemon - Launch Overlay: Run
cursor-clipwithout any arguments (ideally bind it to a hotkey, e.g., Super+V) - Trigger: Your mouse position is automatically captured
- View History: The clipboard history window will appear at your cursor position, showing:
- Recent clipboard items with content previews
- Content type icons (text, URL, code, password, file)
- Timestamps showing when items were copied
- Quick actions: Clear All, Delete, Pin and Close
- Interact:
- Click any item to copy it back to the clipboard
- Scroll through your clipboard history
- Clear All to remove all history items
- Delete to remove a single item from history
- Pin to keep an item permanently at the top of the list
- Keyboard navigation: Use Arrow keys or J/K to navigate, Enter to select, Delete to remove, P to pin, Esc to close
- Three-dot menu on the window header allows you to toggle Delete/Pin button visibility, instant paste and persistent history (config stored permanently in
~/.config/cursor-clip/config.toml)
If persistent history is enabled, clipboard history is stored in an encrypted local database. The database key is stored in your operating system keyring and reused on restart. This ensures that your clipboard history remains secure and private, even if someone gains access to your filesystem (e.g., sidechannel attacks). The encryption and key management are handled automatically by Cursor Clip, so you can enable persistent history with just a simple toggle.
On KDE Plasma, instant paste is currently not available because the compositor does not provide virtual-keyboard-unstable-v1 protocol support. See compositor support details at the bottom of: https://wayland.app/protocols/virtual-keyboard-unstable-v1
┌─────────────────────────────────────────────────┐
│ Cursor Clip │
├─────────────────────────────────────────────────┤
│ GTK4 + Libadwaita UI Layer │
│ ├── Modern styling with CSS │
│ ├── Responsive layouts │
│ └── Accessibility features │
├─────────────────────────────────────────────────┤
│ Wayland Layer Shell Integration │
│ ├── zwlr_layer_shell_v1 protocol │
│ ├── Positioning and anchoring │
│ └── Overlay layer management │
├─────────────────────────────────────────────────┤
│ Clipboard Management │
│ ├── Data Control Manager for privileged access │
│ ├── IPC communication via UNIX domain sockets │
│ ├── IndexMap for clipboard history storage │
│ └── Stoolap for persistent history storage │
└─────────────────────────────────────────────────┘
- GTK4: Modern UI toolkit
- Libadwaita: GNOME's design system
- gtk4-layer-shell: Wayland layer shell integration
- wayland-client: Wayland protocol bindings
- wayland-protocols: Extended Wayland protocols
- wayland-protocols-wlr: wlroots-specific Wayland protocols
- Tokio runtime: Asynchronous runtime
- serde: Serialization framework
- indexmap: Ordered map for clipboard history
- fast_image_resize: Efficient image resizing for previews
- keyring: Secure storage for encryption keys
- stoolap: Encrypted local database for persistent history
- env_logger: Logging framework
Built with ❤️ using Rust, GTK4, Libadwaita, and Wayland Layer Shell
If you find this project useful and would like to support its development, consider sponsoring me on GitHub or Ko-fi. Your support helps me dedicate more time to improving and maintaining Cursor Clip.
- GitHub Sponsors: https://github.com/sponsors/Sirulex
- Ko-fi: https://ko-fi.com/sirulex
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See LICENSE for the full text.