Guides

Restore window layouts from Stream Deck, shortcuts and scripts

Hotkeys are great until you run out of key combinations, or you want a layout to change at a fixed time without touching the keyboard. Since version 1.4, WindowLayout can be driven from the command line. A Stream Deck button, a desktop shortcut, a Task Scheduler task or a script can restore a window profile, apply a display profile, undo, move the window in front or set brightness. This guide lists the commands, shows three ready-made setups and explains the rules that keep it predictable.

Updated 5 steps

  1. Learn the commands

    WindowLayout.exe takes one command per run. --profile "Name" restores a window profile and --display-profile "Name" applies a display profile. --undo reverts the last window-profile restore. --move-to-monitor 2 moves the window in front to monitor 2, and --brightness 70 sets DDC/CI brightness on every monitor, or on one monitor when you add --monitor 3. --list --out followed by a path ending in .json writes the names of your profiles to that file, and --help opens the help page. Put names with spaces in quotes; both --flag value and --flag=value work.

  2. Copy the exact path from WindowLayout

    Open Settings in WindowLayout, find Command line and click Commands and examples. The sheet shows every command with the full path of WindowLayout.exe on your PC, already filled in with the name of one of your own profiles, and a Copy button next to each. The installed version lives inside your user profile's AppData folder, while the portable version runs from wherever you saved it, so copy the path from this sheet rather than typing it from memory.

  3. Add a Stream Deck button

    In the Stream Deck app, drag the System, Open action onto a key. In the App / File field, paste the full command: the path to WindowLayout.exe followed by --profile and your profile name in quotes. Press the key and the profile is restored. Make one key per profile, one for --undo and a pair for --brightness 30 and --brightness 80 for evening and morning. Other launchers, macro pads and mouse software that can run a program with arguments work the same way.

  4. Run it on a schedule or from a shortcut

    For Task Scheduler, create a task, add the action Start a program, put the path of WindowLayout.exe in Program/script and the command, such as --display-profile "Desk", in Add arguments. Trigger it at a time of day, at log on or on workstation unlock. For a desktop shortcut, right-click the desktop, choose New, Shortcut and enter the path followed by the command as the location of the item; in the shortcut's properties you can also give it a Windows shortcut key.

  5. Know what happens when it runs

    If WindowLayout is already running, the command is handed to it at once. If not, it starts in the background without opening its window and runs the command a couple of seconds later. Profiles restored from the command line move windows only and never start programs, even when the profile is set to launch missing apps, and display profiles are applied without the 15-second question, just like triggers. Unknown options, two commands at once and numbers out of range are rejected: nothing runs, and WindowLayout opens with a short message instead.

Frequently asked questions

Does the command line print anything a script can read?

No. WindowLayout is a Windows app rather than a console program, so it writes no text output. Use --list together with --out and a .json file path to get the names of your profiles in a file that a script can read.

Can a script start my apps before restoring a profile?

WindowLayout itself never launches programs from the command line. Start the apps in your script or batch file first, wait a few seconds for their windows to appear, then run --profile to put the windows in place.

What happens if I mistype a command?

Nothing runs. WindowLayout rejects the whole command line, opens its window and shows a message that names only the problem, not the values you passed. Check the spelling against the Commands and examples sheet in Settings.

Try it on your own desk

WindowLayout is free, about 3 MB, works offline and has no ads or telemetry. Save your first window layout in under a minute.

Go to download