Skip to content

tardigrade1001/driveBridge

Repository files navigation

☁️ DriveBridge

A lightweight Google Drive sync client for Windows. Lives in your system tray, stays out of your way.

DriveBridge wraps rclone bisync in a polished Dropbox-style tray app. Two-way sync, live file watching, conflict resolution, and mass-deletion protection, without the bloat of the official client.

Windows only. Requires Python 3.10+ and rclone.


Features

  • Two-way bisync: keeps a local folder and a Google Drive folder in sync, both ways
  • Live watchdog: detects file changes instantly and syncs within seconds, with debouncing so it does not hammer your CPU while you are actively typing
  • Ultra-fast Scanning: optimized with parallel checkers and checksum-skipping to reduce sync overhead from minutes to seconds
  • Automatic Conflict Resolution: uses "newer wins" logic to resolve simultaneous edits instantly, preventing "conflict file" clutter while preserving your latest save
  • Cross-Platform Stability: handles Google Drive's 1-second timestamp rounding to prevent "false" change detections and unnecessary syncs
  • Mass deletion protection: if a sync would delete a large number of files on Drive, it pauses and asks for confirmation before touching anything
  • Boot-sweep recovery: runs a full reconciliation on every launch to catch changes made while the app was offline
  • Smart exclusions: ignores Windows and Office lock files (~$*, Thumbs.db, .tmp, desktop.ini) that would otherwise cause endless sync loops
  • Single-instance enforcement: native Windows mutex prevents duplicate background processes
  • Native toast notifications: sync complete and error alerts via the Windows notification center, no extra packages required
  • Catppuccin dark theme

Requirements


Installation

1. Clone the repo

git clone https://github.com/your-username/DriveBridge.git
cd DriveBridge

2. Install Python dependencies

pip install -r requirements.txt

3. Install rclone

Download from rclone.org/downloads and install it. The setup wizard will help you locate the executable on first launch.

4. Launch DriveBridge

Launch DriveBridge.bat

On first launch, the setup wizard will walk you through authenticating with Google Drive and choosing your sync folder. No manual rclone configuration is needed.


Usage

Double-click Launch DriveBridge.bat to start. DriveBridge runs silently in the system tray.

Tray action What it does
Single click Open the activity feed (status, live progress, recent files)
Double click Open Settings
Right click > Sync Now Trigger an immediate sync
Right click > Pause Pause all sync activity
Right click > Quit Exit cleanly, terminating all rclone processes

Sync modes

Configure in Settings > Sync Behavior:

Mode Description
Interval Syncs every N minutes (default: 30)
Watchdog Syncs within seconds of any file change
Both Watchdog for instant sync, with interval as a safety net

Project Structure

DriveBridge/
├── main.py                     # App entry point: tray icon, background loops, mutex
├── Launch DriveBridge.bat      # Launcher: finds pythonw/python from PATH automatically
├── requirements.txt
│
├── core/                       # Engine, no UI imports
│   ├── config.py               # Reads/writes drivebridge_config.json
│   ├── logger.py               # In-memory ring buffer + rotating log file (512 KB cap)
│   ├── rclone_manager.py       # All rclone subprocess orchestration
│   └── startup.py              # Windows Startup folder registration
│
├── ui/                         # All GUI windows (customtkinter)
│   ├── theme.py                # Shared colours
│   ├── activity_feed.py        # Tray popup: live progress + recent file history
│   ├── settings_gui.py         # Settings panel
│   ├── conflict_ui.py          # Conflict resolver dialog
│   ├── wizard.py               # First-run setup wizard
│   └── gui_utils.py            # Window icon helper
│
└── utils/
    └── notify_utils.py         # Native Windows toast notifications

Fresh Machine Setup

  1. Install Python 3.10+ and add it to PATH
  2. Install rclone
  3. Clone this repo and run pip install -r requirements.txt
  4. Run Launch DriveBridge.bat and follow the setup wizard

The wizard will detect if rclone is missing or if no Google Drive remote is configured, and guide you through each step.


The Story Behind This

The idea started with a frustration with the official Google Drive desktop client. Marking files for offline access stores two copies: one on your main drive, one in Google's cache on C:. Delete the C: copy and it redownloads. Keep files online-only and they are inaccessible from the main PC. For someone who needed reliable sync across machines, neither option was workable.

The original plan was to build around a clear hierarchy: the PC as the main base holding everything, the laptop as a satellite that pulls files from the cloud on request. The cloud would serve as a backup layer, not the source of truth.

The laptop side proved to be genuinely complex to implement. It required rclone mounting via WinFsp, pinned folders for selective offline access, and cache management. Partway through, it became clear that the official Google Drive client's online-only mode already covers that use case well enough. The laptop implementation was dropped, the PC sync side was completed and tested, and that is what DriveBridge is today.


Credits

The idea, requirements, and direction came from me. The code was written collaboratively with Claude and Gemini as AI coding assistants across multiple sessions.


License

MIT — see LICENSE

About

A lightweight Google Drive sync client for Windows

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors