Rename plugin id to alanfortlink.clipboard (manifest, IPC, bindings, scripts, docs)
This commit is contained in:
+5
-5
@@ -82,7 +82,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------ pause
|
// ------------------------------------------------------------ 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.
|
// (or {"paused":false}, or {"paused":"toggle"}), and Ctrl+Space in the picker.
|
||||||
function setPaused(next) {
|
function setPaused(next) {
|
||||||
root.paused = !!next
|
root.paused = !!next
|
||||||
@@ -104,7 +104,7 @@ Item {
|
|||||||
|
|
||||||
function isPaused() { return JSON.stringify({ paused: root.paused }) }
|
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.
|
// Opens the picker with a preset query so scripts can capture it keyboard-free.
|
||||||
function debugSetFilter(payloadJson) {
|
function debugSetFilter(payloadJson) {
|
||||||
var p = {}
|
var p = {}
|
||||||
@@ -319,7 +319,7 @@ Item {
|
|||||||
PointerMoveGate { id: pointerGate; referenceItem: card }
|
PointerMoveGate { id: pointerGate; referenceItem: card }
|
||||||
|
|
||||||
// User settings live on this plugin's entry in shell.json (hot-reloads):
|
// 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 {
|
FileView {
|
||||||
id: shellConfigFile
|
id: shellConfigFile
|
||||||
path: Quickshell.env("HOME") + "/.config/omarchy/shell.json"
|
path: Quickshell.env("HOME") + "/.config/omarchy/shell.json"
|
||||||
@@ -331,7 +331,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function applySettings(raw) {
|
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
|
var needsWatchRestart = s.qrDecode !== root.qrDecode || s.ocr !== root.ocr
|
||||||
|| s.ocrLang !== root.ocrLang
|
|| s.ocrLang !== root.ocrLang
|
||||||
root.historyLimit = s.historyLimit
|
root.historyLimit = s.historyLimit
|
||||||
@@ -437,7 +437,7 @@ Item {
|
|||||||
width: root.cardWidth
|
width: root.cardWidth
|
||||||
height: root.cardHeight
|
height: root.cardHeight
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
WlrLayershell.namespace: "tank-clipboard"
|
WlrLayershell.namespace: "alanfortlink-clipboard"
|
||||||
WlrLayershell.layer: WlrLayer.Overlay
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
||||||
exclusionMode: ExclusionMode.Ignore
|
exclusionMode: ExclusionMode.Ignore
|
||||||
|
|||||||
@@ -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
|
That's the whole install — `omarchy plugin add` clones the repo, validates the
|
||||||
manifest, and enables it. It replaces the built-in `omarchy.clipboard`
|
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
|
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 —
|
via the clone mechanism. For a custom binding, edit the **live** config —
|
||||||
@@ -70,12 +70,12 @@ but is not sourced):
|
|||||||
|
|
||||||
```lua
|
```lua
|
||||||
o.bind("ALT + SHIFT + V", "Clipboard manager (clipboard-history)",
|
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, …`.)
|
(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
|
## 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:
|
Pause/resume is also scriptable — useful for automation or a custom binding:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
omarchy-shell shell call tank.clipboard pause '{"paused":"toggle"}'
|
omarchy-shell shell call alanfortlink.clipboard pause '{"paused":"toggle"}'
|
||||||
omarchy-shell shell call tank.clipboard isPaused
|
omarchy-shell shell call alanfortlink.clipboard isPaused
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
@@ -107,7 +107,7 @@ Settings live on the plugin's entry in the `plugins` array of
|
|||||||
"version": 1,
|
"version": 1,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"id": "tank.clipboard",
|
"id": "alanfortlink.clipboard",
|
||||||
"historyLimit": 1500,
|
"historyLimit": 1500,
|
||||||
"maxAgeDays": 30,
|
"maxAgeDays": 30,
|
||||||
"maxRows": 200
|
"maxRows": 200
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/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
|
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
|
ourselves so a single watcher covers every mime) or with no args to snapshot
|
||||||
|
|||||||
+6
-6
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# - rescans + enables it (shell.json gets plugins[] entry; the built-in
|
||||||
# omarchy.clipboard is recorded in disabledPlugins[] and routed here)
|
# omarchy.clipboard is recorded in disabledPlugins[] and routed here)
|
||||||
# - rebinds ALT+SHIFT+V from vicinae to this picker (backs up bindings.conf)
|
# - 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)"
|
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
PLUGIN_DIR="$REPO_DIR"
|
PLUGIN_DIR="$REPO_DIR"
|
||||||
PLUGINS_DIR="$HOME/.config/omarchy/plugins"
|
PLUGINS_DIR="$HOME/.config/omarchy/plugins"
|
||||||
PLUGIN_ID="tank.clipboard"
|
PLUGIN_ID="alanfortlink.clipboard"
|
||||||
BINDINGS="$HOME/.config/hypr/bindings.conf"
|
BINDINGS="$HOME/.config/hypr/bindings.conf"
|
||||||
|
|
||||||
echo "==> Linking plugin into $PLUGINS_DIR/$PLUGIN_ID"
|
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"
|
LUA="$HOME/.config/hypr/bindings.lua"
|
||||||
if grep -q 'ALT + SHIFT + V' "$LUA"; then
|
if grep -q 'ALT + SHIFT + V' "$LUA"; then
|
||||||
cp "$LUA" "$LUA.bak.$(date +%s)"
|
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)"
|
echo " rebound in bindings.lua (vicinae binding replaced)"
|
||||||
rebound=1
|
rebound=1
|
||||||
fi
|
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
|
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"
|
CONF="$HOME/.config/hypr/bindings.conf"
|
||||||
cp "$CONF" "$CONF.bak.$(date +%s)"
|
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"
|
echo " rebound in bindings.conf"
|
||||||
rebound=1
|
rebound=1
|
||||||
fi
|
fi
|
||||||
@@ -62,7 +62,7 @@ if (( rebound )); then
|
|||||||
hyprctl reload >/dev/null
|
hyprctl reload >/dev/null
|
||||||
else
|
else
|
||||||
echo " no ALT+SHIFT+V binding found — add manually to ~/.config/hypr/bindings.lua:"
|
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
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "tank.clipboard",
|
"id": "alanfortlink.clipboard",
|
||||||
"name": "Clipboard History",
|
"name": "Clipboard History",
|
||||||
"version": "1.0.0",
|
"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",
|
"description": "Raycast-style clipboard history: fuzzy search over content, type, app and date, with rich per-type previews",
|
||||||
"kinds": [
|
"kinds": [
|
||||||
"overlay"
|
"overlay"
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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>
|
# Usage: open-entry.sh <entry-id>
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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]
|
# Usage: paste-entry.sh <entry-id> [--copy-only]
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/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
|
layer surface on grim's combined framebuffer. Monitors report logical .x/.y
|
||||||
with .scale; layers report logical xywh; grim captures physical pixels."""
|
with .scale; layers report logical xywh; grim captures physical pixels."""
|
||||||
import json
|
import json
|
||||||
@@ -7,7 +7,7 @@ import re
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
layers = subprocess.run(["hyprctl", "layers"], capture_output=True, text=True).stdout
|
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:
|
if not m:
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
lx, ly, lw, lh = map(int, m.groups())
|
lx, ly, lw, lh = map(int, m.groups())
|
||||||
|
|||||||
@@ -10,21 +10,21 @@ mkdir -p "$OUT"
|
|||||||
|
|
||||||
crop_shot() { # <output.png> — open via IPC first; caller decides what's on screen
|
crop_shot() { # <output.png> — open via IPC first; caller decides what's on screen
|
||||||
local out=$1
|
local out=$1
|
||||||
omarchy-shell shell hide tank.clipboard
|
omarchy-shell shell hide alanfortlink.clipboard
|
||||||
sleep 0.4
|
sleep 0.4
|
||||||
local geo
|
local geo
|
||||||
case $out in
|
case $out in
|
||||||
"$OUT/search.png")
|
"$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
|
esac
|
||||||
sleep 1.5
|
sleep 1.5
|
||||||
local geo; geo=$(python3 "$REPO_DIR/scripts/physical-crop.py")
|
local geo; geo=$(python3 "$REPO_DIR/scripts/physical-crop.py")
|
||||||
grim /tmp/clipshot-full.png
|
grim /tmp/clipshot-full.png
|
||||||
omarchy-shell shell hide tank.clipboard
|
omarchy-shell shell hide alanfortlink.clipboard
|
||||||
sleep 0.4
|
sleep 0.4
|
||||||
magick /tmp/clipshot-full.png -crop "$geo" +repage "$out"
|
magick /tmp/clipshot-full.png -crop "$geo" +repage "$out"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,15 +151,15 @@ test("parseSettings from shell.json", () => {
|
|||||||
const raw = JSON.stringify({
|
const raw = JSON.stringify({
|
||||||
plugins: [
|
plugins: [
|
||||||
{ id: "other.plugin" },
|
{ 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.historyLimit, 500)
|
||||||
assert.equal(s.maxAgeDays, 14)
|
assert.equal(s.maxAgeDays, 14)
|
||||||
assert.equal(s.maxRows, 50)
|
assert.equal(s.maxRows, 50)
|
||||||
assert.equal(s.qrDecode, false)
|
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.historyLimit, 1500)
|
||||||
assert.equal(d.maxAgeDays, 0)
|
assert.equal(d.maxAgeDays, 0)
|
||||||
assert.equal(d.maxRows, 200)
|
assert.equal(d.maxRows, 200)
|
||||||
@@ -167,7 +167,7 @@ test("parseSettings from shell.json", () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test("parseSettings ignores garbage", () => {
|
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)
|
assert.equal(s.historyLimit, 1500)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -182,8 +182,8 @@ test("ocr passes through normalize, dedup, and search", () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test("parseSettings ocr keys", () => {
|
test("parseSettings ocr keys", () => {
|
||||||
const raw = JSON.stringify({ plugins: [{ id: "tank.clipboard", ocr: false, ocrLang: "deu" }] })
|
const raw = JSON.stringify({ plugins: [{ id: "alanfortlink.clipboard", ocr: false, ocrLang: "deu" }] })
|
||||||
const s = Store.parseSettings(raw, "tank.clipboard")
|
const s = Store.parseSettings(raw, "alanfortlink.clipboard")
|
||||||
assert.equal(s.ocr, false)
|
assert.equal(s.ocr, false)
|
||||||
assert.equal(s.ocrLang, "deu")
|
assert.equal(s.ocrLang, "deu")
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user