Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

ClipSync Instant Mobile-to-Linux Clipboard Bridge v2.0 ONLINE



Developer Python Version Platform License


A zero-latency clipboard receiver bridging Android buffers with Linux desktop workstations.


✨ Core Features

  • On-Demand Toggling: Start and stop the listener instantly using your window manager hotkey.
  • Zero Idle CPU Load: Actively kills the Python socket when disabled, ensuring zero background consumption.
  • Dynamic LAN Resolution: Broadcasts your true Wi-Fi or Ethernet IP directly to your desktop notification.
  • Kernel-Level Hostname: Uses POSIX fallback queries to guarantee reliable execution inside subshells.
  • Resilient JSON Parsing: Intelligently processes unescaped characters without breaking socket handlers.

📂 File System Structure

~/.config/clip_sync/
 ├── clip_sync.py       # Python HTTP receiver daemon
 ├── clip_toggle.sh     # Bash process toggle & notification engine
 └── README.md          # Project documentation

📦 Dependencies & Setup

1. Install System Binaries

You need xclip for X11 clipboard access and libnotify for the desktop popup alerts.

Arch Linux / Manjaro

sudo pacman -S xclip libnotify python

Ubuntu / Debian / Pop!_OS

sudo apt update && sudo apt install xclip libnotify-bin python3

Fedora / RHEL

sudo dnf install xclip libnotify python3

2. Clone & Initialize the Project

Clone the repository directly into your configuration folder and set execution permissions.

# Clone the repository
git clone "https://github.com/DeveloperXHarsh/ClipSync.git" ~/.config/clip_sync

# Navigate to the directory
cd ~/.config/clip_sync

# Grant execution rights to the bash wrapper
chmod +x clip_toggle.sh

⚙️ Window Manager Configuration

Map the wrapper script to a global keyboard shortcut to toggle the listener.

i3wm / Sway (~/.config/i3/config)

# Toggle ClipSync Receiver
bindsym $mod+Shift+v exec --no-startup-id ~/.config/clip_sync/clip_toggle.sh

Hyprland (~/.config/hypr/hyprland.conf)

bind = $mainMod SHIFT, V, exec, ~/.config/clip_sync/clip_toggle.sh

BSPWM (~/.config/sxhkd/sxhkdrc)

super + shift + v
    ~/.config/clip_sync/clip_toggle.sh

📱 MacroDroid Configuration (Android)

  1. Create Macro: Open MacroDroid -> Add Macro -> Name it ClipSync Push.
  2. Trigger: Triggers -> Device Events -> Clipboard Change -> Any Content.
  3. Action: Actions -> Applications -> HTTP Request.
  4. Configure Payload:
    • Method: POST
    • URL: http://<YOUR_LINUX_LOCAL_IP>:9999
    • Content-Type: application/json
    • Body:
      {
        "text": "{clipboard}"
      }
  5. Save: Tap the checkmark to save and test!

🔍 Troubleshooting

  • Not Syncing? Check LAN Connection: Ensure both your Linux workstation and Android phone are connected to the exact same Wi-Fi network/subnet.
  • Firewall Blocking Port 9999: Allow incoming local traffic on port 9999:
    sudo ufw allow 9999/tcp

Developed with 💻 by Piyush Rajput (@DeveloperXHarsh)

Released under the MIT License

About

Instant Android to Linux clipboard sync tool. Lightweight Python HTTP daemon and MacroDroid integration for low-latency local network text bridging.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages