Rigshift: a tray app for switching my PC between loadouts

I wanted to spin up my AI tools when I needed them, and switch all of it off to get the machine back for gaming. Doing that by hand meant closing a handful of programs, every time. I wrote a small tray app to do it in one click, and I am sharing it now: Rigshift. I have used it every day since I built it in August.

What it is

Rigshift is a Windows tray app. It switches your machine between loadouts: named sets of apps to start or stop together. You pick a loadout from the tray menu, and Rigshift starts and stops everything in it.

For me that means freeing a shared GPU: closing the local model and Node processes before a game starts. Any set of programs will do. It is Windows only; the build is 64-bit x64.

What you switch

A loadout is either a switch or a button. A switch stays on until you click it again, and turning it off stops what it started. A button runs once and is done. In the menu above, AI has a tick because it is a switch that is currently on.

Three loadouts are built in. They are my own setup, which is why they name Ollama and WSL, and they are only samples. If you have no config file, they are what you get.

Game deliberately leaves Rider, WebStorm and VS Code alone. Those hold unsaved work, and a one-shot from the tray must not end it. If you want a full purge, a loadout you write can do it.

None of that is special to AI, or to games. A loadout is any set of programs you want moved together, and the tray does not care what they are: your editor and a browser, a game and its launcher, OBS and Discord. If a program starts from an executable or from a shortcut, it can go in one. The same program can belong to several loadouts, and turning one off leaves it running while another still needs it. Nothing in the app knows what AI, Dev or Game mean, and the README shows a Streaming loadout that pairs OBS with Discord.

One config file

All of it comes from a single JSON file. Rigshift looks in three places and uses the first it finds:

  1. %APPDATA%\Rigshift\rigshift.json, the per-user file, which the Settings window writes.
  2. rigshift.json beside Rigshift.exe, an optional copy for a portable install.
  3. Built-in defaults.

If the file it finds cannot be parsed, Rigshift falls back to the defaults and shows a balloon. It does not move on to the next location. Comments and trailing commas are accepted when it reads the file.

The config is read again every time you open the tray menu, so an edit takes effect on your next click. One caveat: the ticks in the menu record what Rigshift did, not what it found by looking. Relaunching the app resets every switch to off.

An app definition cannot take arguments. If you need flags, point it at a shortcut.

How loadouts are described

Each loadout is plain JSON in that one file. A toggle setting decides whether it is a switch or a button, kill lists what to stop, and the options hardShutdown and flushDns are what force-stop the WSL service and flush DNS.

Administrator rights

This is the part worth explaining. Most of what a loadout does is start or stop your own programs, and that needs no special rights. AI and Dev never raise an administrator prompt.

A few things do need administrator rights: adding or removing a netsh port proxy, force-stopping the WSL service, flushing DNS, and stopping a herdr server. Game contains two of them, so it prompts.

The design choice is that the tray app itself never runs elevated. When a loadout includes an administrator step, Rigshift relaunches itself as a separate helper, Windows shows its usual prompt, and the helper carries out only those steps. You get at most one prompt per action, and only when an administrator step is needed.

The helper works from a closed list. It does not read your config file, so a config file cannot choose what runs elevated. What it receives is a short list of fixed tokens: add a port proxy, remove a port proxy, stop the WSL service, flush DNS, or stop every herdr process belonging to the account that asked. The tokens carry no paths, process names or command text. There are at most 16 of them, and a port must be written as plain decimal digits from 1 to 65535. Anything else is rejected before a step runs.

The request to the helper is not authenticated; the closed vocabulary is the safety, so a forged request can only ask for one of those few things.

For the same reason, starting WSL is not an elevated step: its command text comes from the config file, which is writable.

If you press Game and decline the prompt, Node, Ollama and WSL have already been shut down. Only the force-stop of the WSL service and the DNS flush are skipped, and a balloon tells you what was not done. A decline leaves a loadout unchanged only when it has no per-user steps.

The limits

You should know these before you press anything.

Stopping an app is taskkill /f. There is no save prompt. The process ends immediately, and unsaved work in it is lost. Rigshift never saves your work first. That is true of the built-in loadouts and of any you write. Game leaves the editors alone, but a loadout you write can kill them.

Process matching is coarse. Killing node ends every Node process.

wsl --shutdown returns before the virtual machine is gone. If you switch Dev back on immediately after switching it off, the two may race with WSL still tearing down.

State follows what was done, not a probe. If an administrator step fails, or a prompt is declined after the per-user steps already ran, the switch still reflects those steps, and a balloon names what was left undone. Switching again re-applies the full start or kill plan.

A portable folder must not be writable by ordinary users. If Rigshift.exe sits somewhere the Users group can write, a program could replace it, and a later prompt you approve would then run that replacement as administrator. Put a portable copy somewhere ordinary users cannot write, not under your profile and not at the root of C:\.

The installer is not code-signed. Windows SmartScreen will warn you the first time.

Installing it

Setup is per-machine. It asks for administrator rights once, installs only to C:\Program Files\Rigshift and adds a Start menu entry. There is an optional checkbox, Start Rigshift when anyone signs in, which puts a shortcut in the all-users Startup folder. After setup the tray starts without elevation. Uninstalling from Settings, then Apps, keeps your config in %APPDATA%\Rigshift.

I installed it from that setup and have run it ever since. It is how herdr starts on this machine now, through the AI loadout, rather than a startup shortcut I built by hand, and the Ollama it starts is the one my other machines use.

If you would rather not install anything, there is a portable build too: rigshift-win-x64.zip is the same self-contained 64-bit build. Unzip it, run Rigshift.exe and keep the files together, in a folder ordinary users cannot write to, for the reason above.

A SHA256SUMS.txt file is attached to the release for checking the downloads.

To build it yourself you need Windows 10 or 11 and the .NET 10 SDK. Run dotnet build -c Release and dotnet test, then launch Rigshift\bin\Release\net10.0-windows\Rigshift.exe directly. Do not use dotnet run: the administrator steps relaunch the executable, and under dotnet run that would point at the wrong program.

Where it is

It is MIT licensed, currently at version 0.1.0, and the code is at github.com/JohnSaunders/Rigshift. Issues and pull requests are welcome, and security reports go to the repo’s private report form.

It is a small tool that does one job: it gets a machine shared between work and play from one state to the other without the manual routine.