Coming from AeroSpace
AeroSpace-compatible apps
Menu bars and widgets built for AeroSpace can show mielwm's workspaces and switch between them, with no plugin to install.
On this page
How it works
An AeroSpace-compatible app learns about your workspaces by running the aerospace command, like aerospace list-workspaces --all --json, and switches by running aerospace workspace 3. Barik and SketchyBar plugins are two of them. mielwm.app holds its own aerospace command that answers the same questions from mielwm:
Point the app at that command instead of AeroSpace's, and it shows mielwm's workspaces and the windows on each. Clicking a workspace or a window switches to it. Command line lists every command it answers.
Turning it on from Settings
Settings > AeroSpace > Work with AeroSpace-compatible apps starts a hidden helper, so apps made for AeroSpace see mielwm running. If Barik is set up, it also points Barik at mielwm's command:
- Make sure mielwm runs from your Applications folder. From the disk image or straight from Downloads, the switch asks you to move it first, because that copy disappears when mielwm quits.
- Turn on Work with AeroSpace-compatible apps, and confirm.
Barik relaunches, and a few seconds later it shows mielwm's workspaces. Any other app needs its path to the command changed once, as Other apps shows. mielwm's own menu bar item switches from All workspaces to Icon, so the numbers don't show twice.
What it changes on your Mac
- A tiny hidden helper app named AeroSpace runs while the switch is on, because some apps only ask when they see AeroSpace running. It quits by itself when mielwm quits.
- When Barik's config file exists, mielwm sets one line in it,
aerospace.path, to its ownaerospacecommand. Before the first edit it saves a copy next to the file, ending in.mielwm-backup, and never overwrites that copy. Without the file, mielwm edits nothing.
mielwm asks before it edits the file and before it relaunches Barik. If you move mielwm.app later, it updates that line the next time it starts. If you set up Barik after you turned the switch on, turn it off and on again.
Turning it off
Turn the switch off. mielwm quits the helper. If it edited Barik's config, it puts the old aerospace.path back, or removes the line if there wasn't one, and relaunches Barik. This works from any copy of mielwm, even after you moved it. If you plan to uninstall mielwm, turn the switch off first.
Other apps
Any other app or script that runs aerospace works too. Change the path it runs to mielwm's command. A status bar plugin script, for example:
If the app only runs aerospace from your PATH, link mielwm's command there instead:
That link hides AeroSpace's own command if you have it installed, so remove the link before you go back to AeroSpace.
An app that also waits for an app called AeroSpace to be running needs the hidden helper, which only runs while the switch in Settings is on.
Good to know
- Floating windows don't belong to a workspace, so the app doesn't list them.
- When mielwm isn't running, the command prints what an AeroSpace with no windows would, so the app shows nothing instead of an error.
- The real AeroSpace and its
aerospacecommand stay untouched, so you can go back to AeroSpace any time. - How often the app asks decides what it costs. Every 5 seconds costs nothing you'd notice. Ten times a second adds up to about a fifth of a CPU core. Performance has the numbers.