finds.dev← search

// the find

shanselman/PeekDesktop

★ 733 · C# · MIT · updated Jun 2026

Click your desktop to peek at it - just like macOS Sonoma.

PeekDesktop ports macOS Sonoma's click-to-peek-desktop feature to Windows 10/11. It uses low-level Windows hooks and Win32 P/Invoke to detect clicks on empty wallpaper or taskbar space, minimize all windows, then restore them exactly when you switch back. It's a finished, single-purpose utility — not a framework or library.

The binary size story is genuinely interesting: going from 65 MB self-contained to 1.88 MB by dropping WinForms, replacing HttpClient with WinHTTP P/Invoke, and hand-rolling Utf8JsonReader/Writer is a real case study in Native AOT optimization, not a toy demo. The architecture is clean — each concern (mouse hook, window tracking, tray icon, updater) lives in its own file and the state machine in DesktopPeek.cs is the single source of truth. The auto-updater does Authenticode signature verification before swapping the binary in place, which most hobby tools skip entirely. There's also a P/Invoke safety harness (InteropHarness) that stress-tests invalid handles and checks for leaks — that's the kind of thing that separates 'it works on my machine' from something you'd actually trust running at login.

The Fly Away mode is openly experimental and known to get confused when anything else touches window state behind its back — which is a real problem on a machine with PowerToys, virtual desktop tools, or anything else that moves windows. Per-monitor peek isn't implemented, so on a multi-monitor setup clicking the wallpaper on one screen minimizes everything everywhere. There's no hotkey support yet, which means the feature is entirely mouse-driven — not great if you're already keyboard-heavy. The hand-written JSON parser for settings is fine now but will bite someone the moment the settings shape needs to evolve; it's the kind of thing that feels clever until the third field rename.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →