Clipboard Sync is a cross-platform application that allows users to synchronize their clipboard content between multiple devices seamlessly. The application runs in the system tray (menu bar) and supports both Linux and macOS.
- Clipboard Synchronization: Automatically sync clipboard content between devices.
- System Tray Integration: Runs in the background and provides a menu bar icon for easy access.
- Auto-Discovery: Automatically discovers the server on the local network using mDNS.
- Start on Login: Option to start the application automatically when the user logs in.
The application consists of two main components:
- Server: Runs on one device and listens for incoming connections from clients. It monitors its own clipboard and broadcasts changes to connected clients.
- Client: Runs on other devices and connects to the server. It monitors the clipboard and sends changes to the server.
-
Server Mode:
- The server starts and advertises its presence on the local network.
- It listens for incoming WebSocket connections from clients.
- It monitors its clipboard for changes and broadcasts any updates to connected clients.
-
Client Mode:
- The client discovers the server on the local network.
- It connects to the server and starts monitoring its clipboard.
- Any changes in the clipboard are sent to the server, which then broadcasts them to all connected clients.
- Go: Ensure you have Go installed on your machine. You can download it from golang.org.
- Linux Dependencies: For Linux, you need to install the following packages:
sudo apt-get install -y xclip libayatana-appindicator3-dev libgtk-3-dev
-
Clone the Repository:
git clone [email protected]:furkanksl/clipboard-sync.git cd clipboard-sync
-
Build the Application:
make clean make dist
-
Install the .deb Package:
sudo dpkg -i dist/clipboard-sync_*.deb sudo apt-get install -f # To fix any dependency issues
-
Run the Server:
clipboard-sync -server -port 8080
-
Run the Client (in another terminal):
clipboard-sync
-
Clone the Repository:
git clone [email protected]:furkanksl/clipboard-sync.git cd clipboard-sync
-
Build the Application:
go build -o bin/clipboard-sync cmd/desktop/main.go
-
Create the macOS App Bundle:
chmod +x build_macos.sh ./build_macos.sh
-
Move the App to Applications:
mv ClipboardSync.app /Applications/
-
Run the Application:
open /Applications/ClipboardSync.app
-
Server: Start the server on one device using the command:
clipboard-sync -server -port 8080
-
Client: Start the client on other devices. The client will automatically discover the server on the local network.
The application logs its activity to a file located at ~/.clipboard-sync/clipboard-sync.log. You can view the logs using:
tail -f ~/.clipboard-sync/clipboard-sync.log- For Linux, the application can be set to start on login by creating an autostart entry in
~/.config/autostart/clipboard-sync.desktop. - For macOS, you can add the application to your login items in System Preferences.
- If the application does not appear in the menu bar, ensure that the necessary dependencies are installed and that the application is running in the background.
- Check the logs for any errors related to clipboard access or network issues.
Contributions are welcome! Please feel free to submit issues or pull requests.