Copiepate is a small utility to remotly set the content of a clipboard.
I created this tool as I use a lot a remote tmux+vim setup and I often need to copy a vim register to my local desktop.
Using rust package manager: ```bash
sudo apt install xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev
cargo install copiepate ```
Using rust package manager: ```bash
sudo apt install xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev cargo install copiepate ```
On your local desktop start the daemon in server mode and forward the port 2323 via ssh:
```bash
copiepate --server
ssh remote-machine -R 2323:localhost:2323 ```
On the remote machine: ```bash
echo -n "New clipboard content" | copiepate ```
In its default configuration, copiepate listens only on the localhost address, meaning that the port is not exposed to the local network.
WARNING: There is no authentication and encryption over the network other than the ssh tunnel. Meaning that any local service can in theory write to the clipboard knowing the port.
You can use copiepate to send the content of a vim register over the network:
vim
" Using Plug as plugin manager:
Plug 'dimtion/copiepate', { 'rtp': 'vim' }
This plugin creates the following default bindings:
```vim
" Send the default register
noremap
" In visual mode, send current selection
vnoremap