Skip to content

ChrisColeTech/win-to-wsl-app

Repository files navigation

Win to WSL

A lightweight Electron-based desktop application for seamless path conversion between Windows, WSL, and MSYS formats.

Version License Platform

Features

  • Multi-Format Path Conversion: Convert paths between Windows, WSL (Windows Subsystem for Linux), and MSYS formats
  • Smart Path Detection: Automatically detects the input path format
  • Clipboard Integration: Quick copy/paste functionality for all path formats
  • Path History: Remembers recently converted paths with usage tracking
  • System Tray Integration: Minimizes to tray for quick access
  • Frameless Custom Window: Modern, VS Code-style interface
  • Dark/Light Theme: Toggle between themes with a single click
  • Persistent Storage: Path history saved using electron-store

Tech Stack

  • Frontend: React 18 + TypeScript + Vite
  • UI Framework: Tailwind CSS + shadcn/ui
  • Desktop: Electron 27
  • State Management: React Context API
  • Icons: React Icons
  • Storage: electron-store

Download & Install

For End Users

Download the latest release from the Releases page.

Windows

  1. Download Win-to-WSL-Setup-X.X.X.exe
  2. Run the installer
  3. Security Warning: You'll see a Windows SmartScreen warning because the app is not yet code-signed with an EV certificate
    • Click "More info"
    • Click "Run anyway"
    • This is a one-time warning - the installed app runs normally after installation
  4. The app will be installed and can be launched from the Start Menu

macOS

  1. Download Win-to-WSL-X.X.X.dmg
  2. Open the DMG and drag the app to Applications
  3. Security Warning: macOS will block the app because it's not yet code-signed with an Apple Developer certificate
    • Open Terminal and run:
      xattr -cr "/Applications/Win to WSL.app"
    • This removes the quarantine flag and allows the app to run
    • You only need to do this once
  4. Launch the app from Applications

Note: These security warnings are normal for unsigned applications. We're working on obtaining code signing certificates to eliminate these warnings in future releases.

Development Setup

Prerequisites

  • Node.js 18+ and npm
  • Windows with WSL installed (for full functionality)

Development

# Clone the repository
git clone https://github.com/ChrisColeTech/win-to-wsl-app.git
cd win-to-wsl-app

# Install dependencies
npm install

# Start development server
npm run dev

The app will start with hot-reload enabled. The frontend runs on port 5173, and Electron loads it automatically.

Build

# Build for production
npm run build

# Create distributable packages
npm run dist          # Build for current platform
npm run dist:win      # Build for Windows
npm run dist:mac      # Build for macOS
npm run dist:linux    # Build for Linux

Built applications will be in the dist/ directory.

Releases

This project uses automatic versioning - every push to master creates a new release!

How It Works

  1. Push to master: Any commit pushed to the master branch
  2. Auto-version bump: GitHub Actions automatically bumps the patch version
  3. Create tag: Creates a git tag (e.g., v1.0.1)
  4. Build & Release: Builds installers for Windows, macOS, and Linux
  5. Publish: Publishes to GitHub Releases automatically

Manual Version Control (Optional)

If you want to control the version bump type:

# Patch release (1.0.0 -> 1.0.1) - Default on every push
npm run release:patch

# Minor release (1.0.0 -> 1.1.0) - New features
npm run release:minor

# Major release (1.0.0 -> 2.0.0) - Breaking changes
npm run release:major

Build Metadata

Each build includes:

  • Version: Auto-incremented patch version
  • Build Number: GitHub Actions run number
  • Platforms: Windows (NSIS), macOS (DMG + ZIP)

Usage

  1. Input Path: Enter or paste any Windows, WSL, or MSYS path
  2. Auto-Detection: The app automatically detects your input format
  3. View Conversions: See all format conversions instantly
  4. Copy Paths: Click copy buttons to copy any format to clipboard
  5. Path History: Click the input field to see recent paths

Path Format Examples

  • Windows: C:\Users\YourName\Documents\project
  • WSL: /mnt/c/Users/YourName/Documents/project
  • MSYS: /c/Users/YourName/Documents/project

Architecture

Project Structure

win-to-wsl-app/
├── electron/              # Electron main process
│   ├── src/
│   │   ├── main.ts       # Main process entry
│   │   └── preload.ts    # Preload script
│   └── assets/           # App icons
├── frontend/             # React frontend
│   ├── src/
│   │   ├── components/   # React components
│   │   ├── hooks/        # Custom hooks
│   │   ├── services/     # Path conversion logic
│   │   └── contexts/     # React contexts
│   └── public/           # Static assets
├── electron-builder.json # Build configuration
└── package.json          # Root package config

Key Components

  • ConverterPanel: Main UI panel with input/output sections
  • PathHistoryInput: Custom dropdown for path history
  • TitleBar: Custom frameless window controls
  • ThemeContext: Dark/light theme management

IPC Communication

The app uses Electron IPC for:

  • Clipboard operations (clipboard:read, clipboard:write)
  • Path history management (history:read, history:add, history:clear)
  • Window controls (window:minimize, window:maximize, window:close)

Configuration

Window Settings

Default window configuration in electron/src/main.ts:

{
  width: 800,
  height: 364,
  minWidth: 600,
  minHeight: 364,
  maxHeight: 364,
  resizable: true,  // Horizontal resize only
  frame: false      // Custom title bar
}

Build Settings

Platform-specific icons and build targets in electron-builder.json.

Development

Available Scripts

npm run dev           # Start dev server (frontend + electron)
npm run build         # Build frontend and electron
npm run lint          # Run ESLint
npm run dist          # Create distributable

Workspace Structure

This project uses npm workspaces:

  • frontend/ - React application workspace
  • electron/ - Electron main process workspace

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Acknowledgments

Support

For issues, questions, or contributions, please visit the GitHub repository.


Made with ❤️ for Windows + WSL developers

About

Lightweight Electron desktop app for seamless path conversion between Windows, WSL, and MSYS formats

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •