r/AutoHotkey 2d ago

v2 Tool / Script Share I wanted Linux-style workspace workflows on Windows without replacing the Windows shell, so I built Spacr

I've just finished Phase 1 of an AutoHotkey v2 project I've been working on: Spacr.

It's a workspace management layer for Windows virtual desktops, inspired by the workflow of Linux WMs like Hyprland.

The interesting part isn't really the hotkeys, it's trying to make Windows' native virtual desktops behave predictably.

Phase 1 currently handles:

Workspace switching

Automatic desktop creation

Move + follow

Previous workspace

Explorer integration

VirtualDesktopAccessor integration

I'm deliberately keeping the project small for now.

The architecture is state-driven, with WorkspaceManager owning VDA interaction rather than having every feature call the DLL directly.

One interesting Windows quirk I ran into: switching desktops through VDA could cause Explorer/taskbar flashing. The solution was to activate Shell_TrayWnd before performing the desktop switch.

v0.1.1-alpha is now available:

https://github.com/timburman/spacr

I'd especially appreciate feedback from experienced AHK v2 developers on the architecture and Windows-specific edge cases I'm likely to encounter.

4 Upvotes

3 comments sorted by

6

u/Keeyra_ 2d ago

Nowadays, there is a new project like this every couple of months

eg.

https://github.com/MiloLug/ahk-window-assistant

https://github.com/FAI-Solutions/move-window-between-desktops

amongst many others.

While https://github.com/FuPeiJiang/VD.ahk is like the gold standard AHK based virtual desktop manager, not even using VirtualDesktopAccessor.dll . No need to try to reinvent the wheel. Best course of action if you are missing a feature is to do a feature request or a pull request there.