From 2e6a2e8da18ac5df04b13d9f4c5d09036ecc8de8 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Sat, 5 Sep 2026 23:33:55 +0100 Subject: [PATCH] Rename plugin id to alanfortlink.clipboard (manifest, IPC, bindings, scripts, docs) --- Clipboard.qml | 10 +++++----- README.md | 12 ++++++------ capture.py | 2 +- install.sh | 12 ++++++------ manifest.json | 4 ++-- open-entry.sh | 2 +- paste-entry.sh | 2 +- scripts/physical-crop.py | 4 ++-- scripts/take-screenshots.sh | 8 ++++---- tests/test-store.mjs | 12 ++++++------ 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Clipboard.qml b/Clipboard.qml index fb5d763..cdfe2b8 100644 --- a/Clipboard.qml +++ b/Clipboard.qml @@ -82,7 +82,7 @@ Item { } // ------------------------------------------------------------ pause - // Toggle via IPC: omarchy-shell shell call tank.clipboard pause '{"paused":true}' + // Toggle via IPC: omarchy-shell shell call alanfortlink.clipboard pause '{"paused":true}' // (or {"paused":false}, or {"paused":"toggle"}), and Ctrl+Space in the picker. function setPaused(next) { root.paused = !!next @@ -104,7 +104,7 @@ Item { function isPaused() { return JSON.stringify({ paused: root.paused }) } - // Screenshot helper: omarchy-shell shell call tank.clipboard debugSetFilter '{"text":"…"}' + // Screenshot helper: omarchy-shell shell call alanfortlink.clipboard debugSetFilter '{"text":"…"}' // Opens the picker with a preset query so scripts can capture it keyboard-free. function debugSetFilter(payloadJson) { var p = {} @@ -319,7 +319,7 @@ Item { PointerMoveGate { id: pointerGate; referenceItem: card } // User settings live on this plugin's entry in shell.json (hot-reloads): - // { "id": "tank.clipboard", "historyLimit": 1500, "maxAgeDays": 30, "maxRows": 200 } + // { "id": "alanfortlink.clipboard", "historyLimit": 1500, "maxAgeDays": 30, "maxRows": 200 } FileView { id: shellConfigFile path: Quickshell.env("HOME") + "/.config/omarchy/shell.json" @@ -331,7 +331,7 @@ Item { } function applySettings(raw) { - var s = Store.parseSettings(raw, "tank.clipboard") + var s = Store.parseSettings(raw, "alanfortlink.clipboard") var needsWatchRestart = s.qrDecode !== root.qrDecode || s.ocr !== root.ocr || s.ocrLang !== root.ocrLang root.historyLimit = s.historyLimit @@ -437,7 +437,7 @@ Item { width: root.cardWidth height: root.cardHeight color: "transparent" - WlrLayershell.namespace: "tank-clipboard" + WlrLayershell.namespace: "alanfortlink-clipboard" WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive exclusionMode: ExclusionMode.Ignore diff --git a/README.md b/README.md index 25084da..0a3de36 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ python3 scripts/backfill-ocr.py # add --lang deu for other languages That's the whole install — `omarchy plugin add` clones the repo, validates the manifest, and enables it. It replaces the built-in `omarchy.clipboard` -(restore it later with `omarchy plugin disable tank.clipboard`). +(restore it later with `omarchy plugin disable alanfortlink.clipboard`). Omarchy's default `Super+Ctrl+V` (and `Super+Shift+V`) already routes to it via the clone mechanism. For a custom binding, edit the **live** config — @@ -70,12 +70,12 @@ but is not sourced): ```lua o.bind("ALT + SHIFT + V", "Clipboard manager (clipboard-history)", - "omarchy-shell shell toggle tank.clipboard") + "omarchy-shell shell toggle alanfortlink.clipboard") ``` (If your config is still legacy `bindings.conf`: `bindd = ALT SHIFT, V, …`.) -Updating: `omarchy plugin update tank.clipboard` · Uninstall: `omarchy plugin remove tank.clipboard` +Updating: `omarchy plugin update alanfortlink.clipboard` · Uninstall: `omarchy plugin remove alanfortlink.clipboard` ## Keys @@ -93,8 +93,8 @@ Updating: `omarchy plugin update tank.clipboard` · Uninstall: `omarchy plugin r Pause/resume is also scriptable — useful for automation or a custom binding: ```bash -omarchy-shell shell call tank.clipboard pause '{"paused":"toggle"}' -omarchy-shell shell call tank.clipboard isPaused +omarchy-shell shell call alanfortlink.clipboard pause '{"paused":"toggle"}' +omarchy-shell shell call alanfortlink.clipboard isPaused ``` ## Configuration @@ -107,7 +107,7 @@ Settings live on the plugin's entry in the `plugins` array of "version": 1, "plugins": [ { - "id": "tank.clipboard", + "id": "alanfortlink.clipboard", "historyLimit": 1500, "maxAgeDays": 30, "maxRows": 200 diff --git a/capture.py b/capture.py index d148154..55d111f 100755 --- a/capture.py +++ b/capture.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Clipboard capture for the tank.clipboard Omarchy shell plugin. +"""Clipboard capture for the alanfortlink.clipboard Omarchy shell plugin. Invoked by `wl-paste --watch` (payload on stdin is ignored — we probe ourselves so a single watcher covers every mime) or with no args to snapshot diff --git a/install.sh b/install.sh index e2754cc..11759b4 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Install the tank.clipboard Omarchy shell plugin from this repo. +# Install the alanfortlink.clipboard Omarchy shell plugin from this repo. # -# - symlinks the repo root (the plugin folder) into ~/.config/omarchy/plugins/tank.clipboard +# - symlinks the repo root (the plugin folder) into ~/.config/omarchy/plugins/alanfortlink.clipboard # - rescans + enables it (shell.json gets plugins[] entry; the built-in # omarchy.clipboard is recorded in disabledPlugins[] and routed here) # - rebinds ALT+SHIFT+V from vicinae to this picker (backs up bindings.conf) @@ -10,7 +10,7 @@ set -euo pipefail REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PLUGIN_DIR="$REPO_DIR" PLUGINS_DIR="$HOME/.config/omarchy/plugins" -PLUGIN_ID="tank.clipboard" +PLUGIN_ID="alanfortlink.clipboard" BINDINGS="$HOME/.config/hypr/bindings.conf" echo "==> Linking plugin into $PLUGINS_DIR/$PLUGIN_ID" @@ -46,7 +46,7 @@ if [[ -f $HOME/.config/hypr/bindings.lua ]]; then LUA="$HOME/.config/hypr/bindings.lua" if grep -q 'ALT + SHIFT + V' "$LUA"; then cp "$LUA" "$LUA.bak.$(date +%s)" - sed -i 's|^o.bind("ALT + SHIFT + V", "Clipboard manager (vicinae)", "vicinae deeplink vicinae://launch/clipboard/history")|o.bind("ALT + SHIFT + V", "Clipboard manager (clipboard-history)", "omarchy-shell shell toggle tank.clipboard")|' "$LUA" + sed -i 's|^o.bind("ALT + SHIFT + V", "Clipboard manager (vicinae)", "vicinae deeplink vicinae://launch/clipboard/history")|o.bind("ALT + SHIFT + V", "Clipboard manager (clipboard-history)", "omarchy-shell shell toggle alanfortlink.clipboard")|' "$LUA" echo " rebound in bindings.lua (vicinae binding replaced)" rebound=1 fi @@ -54,7 +54,7 @@ fi if [[ $rebound != 1 && -f $HOME/.config/hypr/bindings.conf ]] && grep -q "^bindd = ALT SHIFT, V, " "$HOME/.config/hypr/bindings.conf"; then CONF="$HOME/.config/hypr/bindings.conf" cp "$CONF" "$CONF.bak.$(date +%s)" - sed -i 's|^bindd = ALT SHIFT, V, .*|bindd = ALT SHIFT, V, Clipboard manager (clipboard-history), exec, omarchy-shell shell toggle tank.clipboard|' "$CONF" + sed -i 's|^bindd = ALT SHIFT, V, .*|bindd = ALT SHIFT, V, Clipboard manager (clipboard-history), exec, omarchy-shell shell toggle alanfortlink.clipboard|' "$CONF" echo " rebound in bindings.conf" rebound=1 fi @@ -62,7 +62,7 @@ if (( rebound )); then hyprctl reload >/dev/null else echo " no ALT+SHIFT+V binding found — add manually to ~/.config/hypr/bindings.lua:" - echo ' o.bind("ALT + SHIFT + V", "Clipboard manager (clipboard-history)", "omarchy-shell shell toggle tank.clipboard")' + echo ' o.bind("ALT + SHIFT + V", "Clipboard manager (clipboard-history)", "omarchy-shell shell toggle alanfortlink.clipboard")' fi echo diff --git a/manifest.json b/manifest.json index ca72dfe..e76a0f9 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ { "schemaVersion": 1, - "id": "tank.clipboard", + "id": "alanfortlink.clipboard", "name": "Clipboard History", "version": "1.0.0", - "author": "tank", + "author": "alanfortlink", "description": "Raycast-style clipboard history: fuzzy search over content, type, app and date, with rich per-type previews", "kinds": [ "overlay" diff --git a/open-entry.sh b/open-entry.sh index bf75039..b5cc362 100755 --- a/open-entry.sh +++ b/open-entry.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Open a history entry from the tank.clipboard store with the right app. +# Open a history entry from the alanfortlink.clipboard store with the right app. # Usage: open-entry.sh set -euo pipefail diff --git a/paste-entry.sh b/paste-entry.sh index a96f227..97ce3f4 100755 --- a/paste-entry.sh +++ b/paste-entry.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Paste (or just copy) a history entry from the tank.clipboard store. +# Paste (or just copy) a history entry from the alanfortlink.clipboard store. # Usage: paste-entry.sh [--copy-only] set -euo pipefail diff --git a/scripts/physical-crop.py b/scripts/physical-crop.py index 273822d..f300160 100755 --- a/scripts/physical-crop.py +++ b/scripts/physical-crop.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Print the PHYSICAL-pixel crop geometry (WxH+X+Y) of the tank-clipboard +"""Print the PHYSICAL-pixel crop geometry (WxH+X+Y) of the alanfortlink-clipboard layer surface on grim's combined framebuffer. Monitors report logical .x/.y with .scale; layers report logical xywh; grim captures physical pixels.""" import json @@ -7,7 +7,7 @@ import re import subprocess layers = subprocess.run(["hyprctl", "layers"], capture_output=True, text=True).stdout -m = re.search(r"xywh:\s*(\d+) (\d+) (\d+) (\d+).*namespace: tank-clipboard", layers) +m = re.search(r"xywh:\s*(\d+) (\d+) (\d+) (\d+).*namespace: alanfortlink-clipboard", layers) if not m: raise SystemExit(1) lx, ly, lw, lh = map(int, m.groups()) diff --git a/scripts/take-screenshots.sh b/scripts/take-screenshots.sh index c70b706..983bdc4 100755 --- a/scripts/take-screenshots.sh +++ b/scripts/take-screenshots.sh @@ -10,21 +10,21 @@ mkdir -p "$OUT" crop_shot() { # — open via IPC first; caller decides what's on screen local out=$1 - omarchy-shell shell hide tank.clipboard + omarchy-shell shell hide alanfortlink.clipboard sleep 0.4 local geo case $out in "$OUT/search.png") - omarchy-shell shell call tank.clipboard debugSetFilter '{"text":"omarchy"}' + omarchy-shell shell call alanfortlink.clipboard debugSetFilter '{"text":"omarchy"}' ;; *) - omarchy-shell shell toggle tank.clipboard + omarchy-shell shell toggle alanfortlink.clipboard ;; esac sleep 1.5 local geo; geo=$(python3 "$REPO_DIR/scripts/physical-crop.py") grim /tmp/clipshot-full.png - omarchy-shell shell hide tank.clipboard + omarchy-shell shell hide alanfortlink.clipboard sleep 0.4 magick /tmp/clipshot-full.png -crop "$geo" +repage "$out" } diff --git a/tests/test-store.mjs b/tests/test-store.mjs index abc83de..0f766e7 100644 --- a/tests/test-store.mjs +++ b/tests/test-store.mjs @@ -151,15 +151,15 @@ test("parseSettings from shell.json", () => { const raw = JSON.stringify({ plugins: [ { id: "other.plugin" }, - { id: "tank.clipboard", historyLimit: 500, maxAgeDays: 14, maxRows: 50, qrDecode: false, customKey: 1 } + { id: "alanfortlink.clipboard", historyLimit: 500, maxAgeDays: 14, maxRows: 50, qrDecode: false, customKey: 1 } ] }) - const s = Store.parseSettings(raw, "tank.clipboard") + const s = Store.parseSettings(raw, "alanfortlink.clipboard") assert.equal(s.historyLimit, 500) assert.equal(s.maxAgeDays, 14) assert.equal(s.maxRows, 50) assert.equal(s.qrDecode, false) - const d = Store.parseSettings("{}", "tank.clipboard") + const d = Store.parseSettings("{}", "alanfortlink.clipboard") assert.equal(d.historyLimit, 1500) assert.equal(d.maxAgeDays, 0) assert.equal(d.maxRows, 200) @@ -167,7 +167,7 @@ test("parseSettings from shell.json", () => { }) test("parseSettings ignores garbage", () => { - const s = Store.parseSettings("not json", "tank.clipboard") + const s = Store.parseSettings("not json", "alanfortlink.clipboard") assert.equal(s.historyLimit, 1500) }) @@ -182,8 +182,8 @@ test("ocr passes through normalize, dedup, and search", () => { }) test("parseSettings ocr keys", () => { - const raw = JSON.stringify({ plugins: [{ id: "tank.clipboard", ocr: false, ocrLang: "deu" }] }) - const s = Store.parseSettings(raw, "tank.clipboard") + const raw = JSON.stringify({ plugins: [{ id: "alanfortlink.clipboard", ocr: false, ocrLang: "deu" }] }) + const s = Store.parseSettings(raw, "alanfortlink.clipboard") assert.equal(s.ocr, false) assert.equal(s.ocrLang, "deu") })