aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/clipboard/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/clipboard/README.md')
-rw-r--r--desktop/modules/clipboard/README.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/desktop/modules/clipboard/README.md b/desktop/modules/clipboard/README.md
new file mode 100644
index 0000000..4502349
--- /dev/null
+++ b/desktop/modules/clipboard/README.md
@@ -0,0 +1,29 @@
+# clipboard
+
+The clipboard history as a drawer page, replacing the rofi list. The history
+itself is cliphist's, fed by `wl-paste --watch cliphist store` from autostart;
+this module only reads and edits it. CTRL+SHIFT+L opens the drawer straight on
+this page (`ipc call drawer open clipboard`).
+
+- The search field has focus on open and filters as you type, ignoring case.
+- Up and Down move the highlight; Enter or a click copies the entry and closes
+ the drawer.
+- `×` on a row deletes that entry; "Clear all" asks once more ("Confirm?",
+ 3 seconds) and then runs `cliphist wipe`.
+
+Nothing runs while the drawer is closed: the page runs `cliphist list` when
+it opens. 750 entries measured, 42 of them images.
+
+**Entries are untrusted text.** Copy and delete pass the cliphist line to
+`sh -c` as `$1` and print it into `cliphist decode` or `cliphist delete`; it
+never becomes part of a command string.
+
+**Images show as thumbnails.** A row whose preview is cliphist's
+`[[ binary data <size> <type> <WxH> ]]` decodes the entry once into
+`$XDG_RUNTIME_DIR/qs-clip/<id>.png` and reuses the file after. That directory
+is tmpfs, so a reboot clears it. The list is a `ListView`, so only rows that
+are created decode.
+
+`Clip.js` holds the parsing and the filter, tested with:
+
+ node desktop/modules/clipboard/test_clip.js