Recently I’ve been working on a small utility to help scratch a particular itch I had with managing the placement of windows on my screens. More specifically, I found that I would arrange everything how I wanted it in order to be the most productive, and would then have to keep redoing that every time I switched out of that context to check on something else. Enter WindowHerder – my solution to the problem.
What Does It Do?
Right now the functionality of WindowHerder is very basic, as it is very much in an alpha stage. That said, it does work and I have found it very useful. The applications starts up and sits in your system tray, waiting for input from either its context menu or a couple global hotkeys it registers and listens for. The Alt+F1 key combination will take a snapshot of all your top level windows, storing information about their size, position, and the order they are stacked in. Currently I’m not doing anything with child windows, but if it evolves enough it’s possible to do some cool stuff there too.
Once you have a snapshot taken, the Alt+F2 combination will restore things to that state. Any windows closed since taking the snapshot are ignored, obviously. Any windows opened since taking the snapshot are placed behind the windows being restored. The new top window will be activated so it gets the input focus.
The Future
Currently there isn’t anything exposed in the way of customization for things like the hotkey bindings, but that will definitely come in future versions. It displays a balloon tip from the system tray to let you know a snapshot has been taken or restored, but once customization is added you will be able to turn these off if you want.
Locally it works pretty well for me, but I’m definitely interested in hearing about how it works for anyone else since I’ve only tested this on two Windows 7 machines so far. It seems to have some problems restoring your snapshot after minimizing everything to the desktop (Win+D), so that’s something I’m looking into now.
How Does It Work?
As the source gets more mature I can post some details on how everything works under the hood, but to sum it up quickly: I’m using WPF for the application itself (which is largely wasted for now until I get a real UI in there), and a mixture of native Win32 calls and managed calls via the Managed Windows API to do the window and hotkey interactions. As a bit of a disclaimer, this is my first time writing anything against the Windows API so if you see that there’s a better way to do something, definitely let me know! The source is all available on GitHub.
Download and Feedback
WindowHerder is available for download here, so please check it out and let me know what you think. Do you find it useful? Useless? Is there a key feature you’d like to see added? I have some things in mind for features that could be cool, but community support goes a long way to inspire me to get it done so speak up!