From 3975a5b97d94fd39f5aae3917274000e756b4150 Mon Sep 17 00:00:00 2001 From: David Ibia Date: Sun, 18 Oct 2026 13:12:25 +0100 Subject: [PATCH] feat(zsh): add fsimg to send clipboard images to flowstate-remote agents fsimg saves the clipboard image into the Mutagen-synced share (~/Company/flowstate-share here, /home/ubuntu/share on the server), flushes the sync so the file is there before you paste, and copies its server path to the clipboard for an agent's chat. --- .zshrc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.zshrc b/.zshrc index e84f35c..8116dd2 100644 --- a/.zshrc +++ b/.zshrc @@ -429,4 +429,18 @@ function fs() { local session="${1:-main}" mosh flowstate-remote -- tmux new-session -A -s "$session" } + +# Send the clipboard image to flowstate-remote agents. Saves it into the +# Mutagen-synced share (~/Company/flowstate-share <-> /home/ubuntu/share), +# waits for it to reach the server, then copies the server path to paste into chat. +function fsimg() { + local name="clip-$(date +%Y%m%d-%H%M%S).png" + pngpaste ~/Company/flowstate-share/"$name" || return 1 + echo "uploading $name..." + if ! mutagen sync flush fs-share >/dev/null; then + echo "warning: sync flush failed, the file may not be on the server yet" >&2 + fi + printf '/home/ubuntu/share/%s' "$name" | pbcopy + echo "path copied: /home/ubuntu/share/$name" +} export PATH=$PATH:$HOME/.maestro/bin