r/devtools • • Oct 31 '26

I built a lightweight CLI tool to save and restore window layouts across Virtual Desktops (even after reboots)

Most popular Windows apps are usually decent at remembering where they were when you reopen them, but that is not true for everything. If you organize specific tools in precise sizes, or if you keep different projects spread across multiple virtual desktops, Windows often scrambles your layout or dumps everything back onto a single desktop after a reboot.

I built WinStasis to solve this for my own workflow. It is a lightweight, free, and open-source command-line tool that lets you snapshot your active layout and restore windows back to their exact positions, sizes, and virtual desktops.

What it does:

  • Saves the physical coordinates, sizes, and Virtual Desktop assignments for your open windows.
  • Restores the full layout on command through the CLI.
  • Restores individual windows on demand using target IDs.
  • Keeps multi-desktop setups organized without having to rearrange windows manually after restarting.

Upcoming features currently in progress:

  • Scoped capture and restoration: Saving and restoring specific windows or individual Virtual Desktops rather than capturing the entire desktop layer unconditionally.
  • Live inspection (winst list --live): Viewing active windows and their assigned desktop indices before writing a profile.

The source code and pre-built binaries are available on GitHub:

https://github.com/amirf147/winstasis

1 Upvotes

3 comments sorted by

1

u/kantorcodes1 Oct 31 '26

What was the first app or project setup that made you want to save a full virtual-desktop layout between reboots?

1

u/Substantial-Pride682 Nov 01 '26 edited Nov 01 '26

When I was finishing my bachelor's degree I often had the work I'm doing in different classes opened up in their own respective workspaces. Nowadays I have one virtual Desktop for job searching, and separate ones for each of the larger more research intensive projects im doing where i might have docs, notepads, and browsers with tabs open. I have a bunch of projects running in parallel and some of them I don't work on for a while but I leave all the windows and everything and their configuration saved in own workspace. But this idea came to me when when using an accessibility tool which has a heads up display and every time I would run the accessibility tool the heads up display would just open up in its default state and there was no way to configure it from accessibility tool itself so I always wanted it to be a certain shape and size and to be on all my desktops. Also the Antigravity IDE app from Google doesn't snap your previously open windows back to the right desktops, it just bunches them into one desktop when the app resets or when have you opened it back up again after it has been closed.

1

u/kantorcodes1 29d ago

The accessibility HUD example is a strong one: wanting it to reopen in a particular spot on every desktop makes the need for saved window state concrete. Thanks for explaining where WinStasis came from.