This commit is contained in:
2025-09-18 11:35:56 +02:00
commit 2203d6075f
45 changed files with 935 additions and 0 deletions

22
shell/clipsend.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
REMOTE_FILE="~/clip"
SEPARATOR='---xx---'
case "$1" in
append)
clipboard_content=$(wl-paste)
formatted_content="$SEPARATOR\n$clipboard_content\n"
echo -e "$formatted_content" | ssh bi "cat >> $REMOTE_FILE"
echo "Clipboard contents appended to remote file."
;;
retrieve)
lines=$(ssh bi "tac $REMOTE_FILE | awk '/$SEPARATOR/ {exit} {print}' | tac")
echo -e "$lines" | wl-copy
echo "Last entry copied to clipboard."
wtype $lines
;;
*)
echo "Usage: $0 {append|retrieve}"
;;
esac