// desktop app [In development]
Strata
A keyboard-driven window switcher for Windows 11
Native Windows desktop engineering
Windows 11's built-in Alt+Tab is a flat, recency-ordered list with no search, no grouping, and no preview. Strata replaces it with a global-hotkey overlay that fuzzy-searches every open window, groups them into editable categories, and renders Exposé-style thumbnails — while solving the genuinely hard parts of Windows window management: alt-tab visibility rules, off-screen thumbnail capture, foreground-activation restrictions, and per-monitor DPI. It's an independent native-desktop project, actively developed.
- .NET 8
- C#
- WPF
- WPF-UI
- CommunityToolkit.Mvvm
- Win32 P/Invoke
// architecture
Global hotkey ──► EnumWindows + alt-tab rules ──► categorize + fuzzy filter ──► thumbnail capture ──► AttachThreadInput activate
// how it's built
A background window handle registers a system-wide hotkey via Win32 RegisterHotKey (default Ctrl+Alt+Space, with MOD_NOREPEAT) and receives WM_HOTKEY in WndProc. The window stays hidden until summoned; a named mutex enforces a single instance so the hotkey is never double-registered.
EnumWindows walks top-level windows in z-order, then the alt-tab visibility rules are replicated by hand: IsWindowVisible, the DWMWA_CLOAKED attribute (virtual desktops / Task View), WS_EX_TOOLWINDOW vs WS_EX_APPWINDOW styles and owner chain, plus a denylist. UWP apps hosted by ApplicationFrameHost are resolved to their real process via EnumChildWindows.
PrintWindow() renders each window to a device context without it being focused or on top, converted to a frozen WPF BitmapSource. Capture runs off the UI thread (Task.Run) and streams in as each completes, so opening the switcher stays instant even with 20–30 windows.
Windows blocks SetForegroundWindow from a thread that does not own the current foreground input. Strata briefly AttachThreadInput to the foreground thread, calls SetForegroundWindow + BringWindowToTop, then detaches — so it can activate any window regardless of who had focus.
PerMonitorV2 DPI awareness is declared in the app manifest; at runtime GetDpiForMonitor + GetMonitorInfo position the overlay on the active monitor and compute the grid column count from window count, work-area width, and card size.
A WH_MOUSE_LL hook, installed only while the overlay is visible, closes it on a click outside its rect — more reliable than the Deactivated event, which fires spuriously when another app steals focus.
CommunityToolkit.Mvvm source generators back the view models; WPF-UI provides Fluent theming and a live accent picker. Settings and a 13-category, drag-and-drop-editable taxonomy persist to JSON in %AppData%\Strata; startup-on-login toggles the Windows Run registry key.
// highlights
An O(n) subsequence matcher over window titles, process names, and categories — "chr" finds Chrome — with no regex overhead, so search feels instant as you type.
A compact category-grouped list, or an Exposé-style thumbnail grid with three card sizes. Number keys 1–9 jump directly; arrows navigate; Enter switches.
13 built-in categories with emoji glyphs and a drag-and-drop editor to move processes between them. Changes persist and apply on the next open.
Opening the switcher pre-selects the window Alt+Tab would jump to — the second entry in z-order — so a single Enter switches to it.
The overlay appears on the monitor under the cursor, respects per-monitor DPI, and can optionally show only windows on the current monitor.
Hand-written P/Invoke for enumeration, hotkeys, the mouse hook, activation, and DPI — no heavy interop wrapper, which keeps startup fast and dependencies light.
// components
Scans top-level windows, applies alt-tab visibility rules, resolves UWP hosts, and computes the MRU target.
The hotkey-summoned WPF overlay: search, list/grid views, keyboard and mouse handling, click-outside-to-close, and activation.
JSON-persisted theme, accent, hotkey, exclusions, and a user-editable category taxonomy with a visual editor.
// related work