Rename plugin id to alanfortlink.clipboard (manifest, IPC, bindings, scripts, docs)
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user