Crates.io | clipboard-sync |
lib.rs | clipboard-sync |
version | 0.2.0 |
source | src |
created_at | 2022-11-15 15:37:27.029665 |
updated_at | 2023-08-03 21:05:02.000521 |
description | Synchronizes the clipboard across multiple X11 and wayland instances running on the same machine. |
homepage | |
repository | |
max_upload_size | |
id | 715779 |
size | 85,687 |
Synchronizes the clipboard across multiple X11 and wayland instances running on the same machine.
Example use cases:
Install clipboard-sync with your system's package manager. If your system is not supported, please vote on the appropriate issue, or create one if it does not exist.
clipboard-sync is available in the Arch User Repository.
Install from the official repository:
sudo wget -P /etc/apt/sources.list.d/ https://raw.githubusercontent.com/dnut/deb/master/dnut.list
sudo apt update && sudo apt install clipboard-sync
If your system is not supported, you have two other options:
Build from Source, then install either system-wide or for only the current user:
sudo make install # system
make user-install # user
It can be easily uninstalled:
sudo make uninstall # system
make user-uninstall # user
clipboard-sync is published to crates.io, so it can be installed as a normal binary crate.
cargo install clipboard-sync
wget -P "$HOME/.config/systemd/" https://raw.githubusercontent.com/dnut/clipboard-sync/master/clipboard-sync.service
It can be easily uninstalled:
cargo uninstall clipboard-sync
rm -r "$HOME/.config/systemd/clipboard-sync.service"
In addition to installing from the official repository, you can also build and install the deb package from source. Follow the instructions to Build from Source, then create a deb file and install it with:
make deb && sudo apt install ./dist/deb/clipboard-sync_*.deb
sudo pacman -Syu make gcc libxcb
sudo apt install make gcc libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
wget -O- https://github.com/dnut/clipboard-sync/archive/refs/tags/0.2.0.tar.gz | tar xvz
curl -L https://github.com/dnut/clipboard-sync/archive/refs/tags/0.2.0.tar.gz | tar xvz
git clone https://github.com/dnut/clipboard-sync.git --branch stable
cd clipboard-sync*
make
The executable is here:
./target/release/clipboard-sync
The typical set-and-forget approach is to enable to service:
systemctl --user enable --now clipboard-sync
If you don't want it to run constantly, only on-demand, don't use systemd. Directly call the binary as needed:
clipboard-sync
You can also daemonize clipboard-sync using tmux instead of systemd. ~/.bashrc aliases may be handy for these commands.
tmux new-session -ds clipboard-sync clipboard-sync # start in background
tmux attach -t clipboard-sync # view status
ctrl-b, d # while viewing status, send back to background
ctrl-c # while viewing status, terminate the process