I was originally in a team working on a hardware hack with the Sony ps4 eye stereo camera. It has a proprietary plug that needs to be cut off and have the wires soldered to a USB3 connector to be able to connect to a PC. However even after doing this we were not able to get it to properly work for almost 24 hours. So we had to abandon our idea.

During the troubleshooting there were many instances where we needed to copy/paste text quickly between our PCs and since we didn't know each other's social media or want to create new accounts we quickly became involved in an annoying mess of transferring files over USB. When our hardware hack didn't pan out, I decided to do something to tackle this issue.

What it does

Effectively; the clipboards on two PCs become the same clipboard. Anything copied on one PC is paste-able from the other and vice versa. There isn't much of a UI right now, the program just runs in the background.

How I built it

A dirty, atrocious, horrendously written and convoluted set of shell scripts manipulating a shared Dropbox folder (which could have been substituted with any kind of network drive) between two users to transfer data between the machines. These scripts are also responsible for reading and writing to the operating system clipboard.

Challenges I ran into

Tried to use various libraries (C and C++) to manipulate the clipboard and wasted many hours. Don't deal with these cross-platform libraries when working with the clipboard unless you are a masochist. Even if you were to copy examples in the documentation (when there was documentation) the code won't even compile; or if it does compile it will immediately segfault when run.

Accomplishments that I'm proud of

Although this hack isn't very technically impressive or innovative, I'm glad to have finished in such limited time.

What I learned

  • How to write shell scripts.

  • Not to write shell scripts.

What's next for clip-sync

To develop it further; I'd improve the latency, add a proper user interface, make toggling it on/off easier, fix bugs and allow it to work with more then text.

Oh and I'd rewrite it in a saner manner.

Built With

Share this project: