initial commit, add tmux wl-copy style on remote servers through .bashrc
This commit is contained in:
@@ -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}')"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user