clipboard-sync-preview
A very simple tool which helps to sync the clipboard between computers by relying on a shared folder.
Get started
Install with:
npm install --global clipboard-sync-preview
And run it with:
clipboard-sync-preview
When you run, it will be syncing until you close it.
The tool will write the clipboard to files in a clipboard-sync-preview
relative to where you started it, and it will read from it too.
Using OneDrive
If you have OneDrive set on both computers, this is how you can use this tool to sync the clipboard:
- Create a folder called
clipboard-sync-preview
in the root of your OneDrive folder. - Turn on Always keep on this device for this folder on both computers:
- Open a shell (e.g. Windows PowerShell) on the root of your OneDrive folder and run
clipboard-sync-preview
from there. Do it on both computers.
The OneDrive client will handle downloading and uploading the files which clipboard-sync-preview
will create.
How it works
It is very simple.
When a new text is detected in your clipboard, the tool will create a file in the clipboard-sync-preview
folder with its contents.
When a new file is detected in the clipboard-sync-preview
folder, the tool will read its contents and write it to the clipboard.
Some safeguards are implemented to prevent infinite loops and unneeded operations.
Also, it deletes the files created when they become 5 minutes old.