hyprforge_clipboard/lib.rs
1//! The clipboard history: what was copied, and what may be kept.
2//!
3//! Replaces copyq. Text and images, a history that survives a restart,
4//! and a popup that appears where the pointer is.
5//!
6//! # The rule this crate is built around
7//!
8//! A clipboard manager writes a history to disk. A password manager puts
9//! your password on the clipboard. Without care, using both means your
10//! vault ends up in a file in your home directory and neither program
11//! ever mentions it.
12//!
13//! So [`types::Sensitivity`] is checked *before* an offer's bytes are
14//! ever requested: a secret is not read, not hashed, not stored and not
15//! logged. `Debug` on an entry renders a description rather than the
16//! content, for the same reason `hyprforge-authui` hand-writes its own.
17
18pub mod backend;
19pub mod ipc;
20pub mod paste;
21pub mod resolve;
22pub mod store;
23pub mod types;
24pub mod wayland;
25pub mod write;
26
27pub use backend::ClipboardWatcher;
28pub use paste::{PasteOutcome, PasteSynthesizer, Shortcut};
29pub use store::{History, HistoryError, Recordable};
30pub use types::{Content, Entry, EntryId, Mime, Sensitivity};
31pub use wayland::{read_selection, WaylandPaster, WaylandWatcher, WaylandWriter};
32pub use write::{ClipboardWriter, Offers, SelectionGuard, SelectionOutcome};