Skip to main content

Crate hyprforge_clipboard

Crate hyprforge_clipboard 

Source
Expand description

The clipboard history: what was copied, and what may be kept.

Replaces copyq. Text and images, a history that survives a restart, and a popup that appears where the pointer is.

§The rule this crate is built around

A clipboard manager writes a history to disk. A password manager puts your password on the clipboard. Without care, using both means your vault ends up in a file in your home directory and neither program ever mentions it.

So types::Sensitivity is checked before an offer’s bytes are ever requested: a secret is not read, not hashed, not stored and not logged. Debug on an entry renders a description rather than the content, for the same reason hyprforge-authui hand-writes its own.

Re-exports§

pub use backend::ClipboardWatcher;
pub use paste::PasteOutcome;
pub use paste::PasteSynthesizer;
pub use paste::Shortcut;
pub use store::History;
pub use store::HistoryError;
pub use store::Recordable;
pub use types::Content;
pub use types::Entry;
pub use types::EntryId;
pub use types::Mime;
pub use types::Sensitivity;
pub use wayland::read_selection;
pub use wayland::WaylandPaster;
pub use wayland::WaylandWatcher;
pub use wayland::WaylandWriter;
pub use write::ClipboardWriter;
pub use write::Offers;
pub use write::SelectionGuard;
pub use write::SelectionOutcome;

Modules§

backend
The boundary between clipboard-history logic and the compositor.
ipc
Unix-domain socket control interface for hyprforge-clipd.
paste
Synthesising a paste (Ctrl+V) after the clipboard has been set.
resolve
Deciding what an accumulated offer is worth keeping — before any of its bytes are read.
store
The clipboard history: what is kept, in what order, how much, and how it survives a restart.
types
What a clipboard entry is, with no Wayland in it.
wayland
The real backend: watches the compositor’s clipboard over ext-data-control-v1, falling back to zwlr-data-control-v1.
write
Putting content back on the clipboard — the write side of the boundary crate::backend draws for reading it.