Initial scaffold: blob store server, CLI scripts, and PWA share target

Clipboard/screenshot sync across own devices via a single DEVICE_TOKEN-gated
blob store, plus a small installable web app so a phone can push/pull
clips and share screenshots via the OS share sheet.
This commit is contained in:
Fredrik Johansson
2026-08-20 15:28:42 +02:00
commit 4eee44f675
28 changed files with 3132 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Reads the system clipboard and pushes it to scrot as a `clip` blob.
set -euo pipefail
: "${SCROT_SERVER:?set SCROT_SERVER, e.g. https://scrot.example.com}"
: "${DEVICE_TOKEN:?set DEVICE_TOKEN}"
if [ -n "${WAYLAND_DISPLAY:-}" ]; then
content=$(wl-paste --no-newline)
else
content=$(xclip -selection clipboard -o)
fi
curl -sf -X POST "$SCROT_SERVER/api/blobs" \
-H "X-Device-Token: $DEVICE_TOKEN" \
-H "X-Blob-Kind: clip" \
-H "Content-Type: text/plain; charset=utf-8" \
--data-binary "$content" \
-o /dev/null
echo "clip pushed"