From 87439c67d052e4036ca3075421522dc7de1632b0 Mon Sep 17 00:00:00 2001 From: Bartal Laearsson Date: Tue, 18 Aug 2026 21:16:16 +0100 Subject: [PATCH] initial commit, add tmux wl-copy style on remote servers through .bashrc --- clipboard.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 clipboard.md 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}')" +} +``` + +