prism-clipboard
A clipboard history manager for Prism. It provides a visual interface to browse, search, and restore previously copied text and images. It leverages 07 Cliphist for storage and 08 Rofi for the selection UI.
How it works
- History Retrieval: The script invokes
cliphist listto fetch the stored clipboard history. - User Selection: This list is piped into
rofi -dmenu, presenting a searchable menu to the user. - Restoration:
- Once an item is selected, it is passed to
cliphist decodeto retrieve the original data (text or image). - The decoded data is then piped to
wl-copy, placing it back into the active Wayland clipboard, ready to be pasted. - A system notification confirms the action.
- Once an item is selected, it is passed to
- Wipe Functionality: If run with the
--wipeflag, it clears the entire clipboard database and sends a notification.
Dependencies
rofi: The menu interface for selecting history items.cliphist: The background daemon that tracks clipboard changes.wl-clipboard: Provideswl-copyto interact with the Wayland clipboard.libnotify: Sends desktop notifications (e.g., "Copied to clipboard").
Usage
To open the clipboard history menu:
prism-clipboard
To clear the clipboard history:
prism-clipboard --wipe