X11 clipboard manager with history, filtering, and persistence
garclip is a clipboard manager for the gardesk ecosystem that monitors both CLIPBOARD and PRIMARY X11 selections. It maintains a searchable history with configurable limits, supports text, images, and file URIs, provides content filtering by regex patterns and window class, and includes a keyboard-driven picker UI for selecting from history. Built with XFixes for efficient event-driven monitoring.
garclip is available as an RPM package for Fedora and RHEL-compatible distributions.
garclip - Main daemon with built-in CLI commandsgarclipctl - Standalone control utilitygarclip-picker - GUI picker for selecting from historyStart the daemon and interact with the clipboard.
Use arrow keys to navigate, type to filter, Enter to select, Escape to cancel.
Add garclip to your gar configuration with a keybinding for the picker.
-- ~/.config/gar/init.lua
-- Start clipboard daemon
gar.exec_once("garclip daemon")
-- Bind Super+V to open clipboard picker
gar.bind("mod+v", function()
gar.spawn("garclip-picker")
end) Create a user service for automatic startup.
# ~/.config/systemd/user/garclip.service
[Unit]
Description=garclip clipboard manager
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/garclip daemon --foreground
Restart=on-failure
[Install]
WantedBy=graphical-session.target | Option | Type | Default | Description |
|---|---|---|---|
daemon [--foreground] | - | - | Start the clipboard daemon (--foreground for debugging) |
copy [TEXT] | - | - | Copy text to clipboard (reads from stdin if TEXT not provided) |
paste | - | - | Output current clipboard content to stdout |
history [--limit N] [--json] | - | - | Show clipboard history (default: 20 entries) |
select ID | - | - | Select an entry from history (makes it current clipboard) |
delete ID | - | - | Delete an entry from history |
clear | - | - | Clear the clipboard |
clear-history [--keep-pinned] | - | - | Clear history (optionally keep pinned entries) |
pin ID | - | - | Pin an entry (survives history limit) |
unpin ID | - | - | Unpin an entry |
list-pinned [--json] | - | - | List pinned entries |
search QUERY [--limit N] [--json] | - | - | Search history by text content |
status [--json] | - | - | Show daemon status |
reload | - | - | Reload configuration |
stop | - | - | Stop the daemon |