Building WinSearch: A macOS Spotlight-Inspired Keyboard Launcher for Windows
How we engineered a Windows-native desktop launcher using Flutter and a C# .NET background sidecar process communicating over Win32 named pipes.
Building WinSearch: A macOS Spotlight-Inspired Keyboard Launcher for Windows
A DeepSky Labs engineering case study
If you swap between macOS and Windows regularly, you quickly notice the gap in system launcher speed and precision. macOS Spotlight feels instant, unintrusive, and predictable. On Windows, default search often pulls up web results you didn't ask for, while tools like PowerToys Run or Wox either lack deep indexing integration or struggle with extensibility across process management, clipboard history, and file qualifiers.
WinSearch was built to solve this: a fast, global Alt+Space launcher for Windows that combines a glassmorphic Flutter interface with a lightweight C# .NET background sidecar process for low-level OS operations.
Technical Architecture
Flutter on desktop excels at rendering fluid, high-DPI UI components at 60+ FPS. However, accessing deep Windows APIs — like querying the Windows Search Index via OLE DB, enumerating native audio output devices via COM interfaces, or monitoring clipboard format listeners — requires native Win32 access.
Instead of writing monolithic Dart FFI bindings for every native API, we structured WinSearch as a clean dual-process system:
+------------------------------------+ Named Pipe JSON-RPC 2.0 +------------------------------------+
| Flutter UI | <------------------------------------> | LauncherService.exe |
| (LauncherShell, Riverpod Notifiers)| \\.\pipe\LauncherServicePipe_v1 | (C# .NET 8 Background Sidecar) |
+------------------------------------+ +------------------------------------+
|
+--------------+--------------+
| |
Windows Search (OLE DB) Win32 Process / Audio APIs
1. Named-Pipe IPC Layer (dart:ffi + C#)
- Transport: Win32 named pipes over
\\.\pipe\LauncherServicePipe_v1using framed JSON-RPC 2.0 messages. - Process Management: The Flutter app spawns and monitors
LauncherService.exe. If the background service crashes or drops,NativeServiceLauncherautomatically attempts a clean respawn before surfacing an error state. - Lifecycle Integration: Implements
WidgetsBindingObserverto send a cleanshutdownRPC request whenever the main Flutter application exits.
2. Structured Query Engine & Qualifier Tokenizer
When you type into WinSearch, raw text passes through a multi-stage parser before hitting search providers:
raw text ---> QueryTokenizer ---> [RawTokens] ---> QueryParser ---> ParsedQuery
- Scoped Modes: Typing
:opens the mode selection palette. Modes restrict query execution to specific providers (e.g.:filefor file search,:procfor process management,:cbfor clipboard history,:setfor Windows settings). - Qualifier Tokens: Supports typed filters directly in the search box, such as
ext:pdf,size:>5mb,order:desc, orstatus:running. - Inline Ghost-Text Autocomplete: Chained autocomplete providers offer greyed-out suggestion text. Pressing
TaborRight Arrowinstantly commits the highlighted key or value.
Core Features & Built-in Plugins
WinSearch ships with 12 built-in search provider plugins, operating under a unified priority-based orchestrator:
| Plugin | Mode Trigger | Primary Mechanism |
|---|---|---|
| Apps Search | Unscoped | Scans Start Menu .lnk shortcuts at boot; ranks matches using an ObjectBox AppUsageTracker. |
| Deep File Search | :file | Dispatches search.files RPC to the C# sidecar, executing raw OLE DB queries against mssearch.exe. |
| Process Manager | :proc | Fetches process lists via processes.list RPC. Includes a two-stage confirmation guard before terminating running PIDs. |
| Clipboard History | :cb | Native Win32 AddClipboardFormatListener background queue. Supports type:text and type:image filters. |
| Audio Switcher | Unscoped / :audio | Core Audio COM API enumeration; switches default audio playback endpoints on demand. |
| Settings Jump | :set | Maps Windows Settings terms directly to ms-settings: protocol deep links. |
| Command Execution | Prefix > | Executes shell commands in PowerShell/cmd. Streams output live with support for elevated (UAC) execution via Ctrl+Enter. |
| Calculator | Unscoped | Inline expression evaluator for instant arithmetic results without opening a calculator app. |
Performance & UX Fine-Tuning
Building a keyboard launcher means every millisecond of UI latency matters. We tuned three key mechanisms to keep interaction smooth:
- Dual-Timer Debounce & Spinner Delay:
- Search requests are debounced by 90ms to prevent intermediate RPC spam while typing fast.
- The loading spinner inside the mode pill uses a 180ms delay timer. Queries that resolve under 180ms render zero visual spinner flicker, giving the launcher an instant feel.
- Two-Pass Fuzzy Matcher:
- Performs exact boundary match scoring first, followed by recursive subsequence gap scoring to order app results accurately.
- State Management Isolation:
- Built entirely on Riverpod 3.x using explicit manual
Notifierclasses without code-generation overhead.
- Built entirely on Riverpod 3.x using explicit manual
Packaging & Testing
WinSearch is backed by a 94-test suite covering unit tests for qualifier parsing and an end-to-end IPC integration test (test/ipc_test.dart) that spawns the compiled LauncherService.exe, verifies named-pipe ping/pong RPCs, forces a shutdown, and validates auto-respawn logic.
For deployment, an Inno Setup bundle script packages the Flutter release binaries, compiled C# sidecar executable, native DLL dependencies, and application manifest into a single executable installer (WinSearch-x86_64-1.0.0-Installer.exe).
WinSearch is developed by DeepSky Labs as a modern desktop productivity utility for Windows. Contact our team to learn more about our architecture and product integrations.