Rename plugin id to alanfortlink.clipboard (manifest, IPC, bindings, scripts, docs)

This commit is contained in:
2026-09-05 23:33:55 +01:00
parent 8027fcd936
commit 2e6a2e8da1
10 changed files with 34 additions and 34 deletions
+5 -5
View File
@@ -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
+6 -6
View File
@@ -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
+1 -1
View File
@@ -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
+6 -6
View File
@@ -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
+2 -2
View File
@@ -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"
+1 -1
View File
@@ -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 <entry-id>
set -euo pipefail
+1 -1
View File
@@ -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 <entry-id> [--copy-only]
set -euo pipefail
+2 -2
View File
@@ -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())
+4 -4
View File
@@ -10,21 +10,21 @@ mkdir -p "$OUT"
crop_shot() { # <output.png> — 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"
}
+6 -6
View File
@@ -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")
})