commit 87439c67d052e4036ca3075421522dc7de1632b0 Author: Bartal Laearsson Date: Tue Aug 18 21:16:16 2026 +0100 initial commit, add tmux wl-copy style on remote servers through .bashrc diff --git a/clipboard.md b/clipboard.md new file mode 100644 index 0000000..d3656e5 --- /dev/null +++ b/clipboard.md @@ -0,0 +1,17 @@ +# Clipboard handy snippets + +## tmux remote session wl-copy style +insert this into bashrc on remote computer +``` +clip() { + local input + if [ -t 0 ]; then + input="$*" + else + input=$(cat) + fi + printf "\033]52;c;%s\007" "$(echo -n "$input" | base64)" > "$(tmux display-message -p '#{client_tty}')" +} +``` + +