AeroSpace icon indicating copy to clipboard operation
AeroSpace copied to clipboard

In-place restart/upgrade support?

Open zheltikov opened this issue 1 year ago • 7 comments

Hello!

I've been using aerospace for a couple of months now and I like it!

The only inconvenience I sometimes face is when upgrading to new versions. I miss the inplace restart i3 feature: docs, more docs

This would be quite useful, instead of quitting aerospace, starting it again, and having to rearrange the windows back to their place again...

Thanks!

zheltikov avatar Jul 29 '24 09:07 zheltikov

just as a suggestion. use something like this, to automatically send windows/apps to the correcty workspace when you start aerospace. it is worth the effort :)

run this and note the strings in the second column to use later as "app-id"

aerospace list-apps

then add something like this to the bottom of your .aerospace.toml

[[on-window-detected]]
if.app-id = 'com.spotify.client'
run = ['move-node-to-workspace 9']

[[on-window-detected]]
if.app-id = 'com.microsoft.teams2'
run = ['move-node-to-workspace 7']

[[on-window-detected]]
if.app-id = 'com.microsoft.Outlook'
run = ['move-node-to-workspace 8']

[[on-window-detected]]
if.app-id = 'com.bitwarden.desktop'
run = ['move-node-to-workspace 10']

[[on-window-detected]]
if.app-id = 'com.microsoft.edgemac'
run = ['move-node-to-workspace 4']

[[on-window-detected]]
if.app-id = 'com.microsoft.rdc.macos'
run = ['move-node-to-workspace 5']

agenttank avatar Jul 29 '24 11:07 agenttank

I have a similar setup, but is there a way to assign a workspace to a monitor without pinning it to that monitor permanently?

GraemeARobinson avatar Jul 30 '24 09:07 GraemeARobinson

I would love a state save that's not tying apps/windows to workspaces permanently as well, as I tend to vary which workspaces I use for what depending on task. So restarting AeroSpace is fairly tedious to get everything back where I want it. Something like dumping the currents state to a temp file, then loading that (if exists) on restart could be a solution?

incanus avatar Aug 07 '24 00:08 incanus

Have you thought about just running the action on start of AeroSpace?

[[on-window-detected]]
if.app-name-regex-substring = 'Obsidian'
if.during-aerospace-startup = true
run = ['move-node-to-workspace 5']

This should allow you to restart AeroSpace and let it re-organize the windows after it starts, after that you can move them how you want.

gempir avatar Aug 14 '24 09:08 gempir

Is there a recommended way to restart the AeroSpace app? I've been terminating through htop and then running again.

l00sed avatar Aug 19 '24 13:08 l00sed

I had been using the Terminal, but now I click the menu item, use the quit entry (click or keystroke), and then restart.

incanus avatar Aug 19 '24 15:08 incanus

Ah, nice, good tip! Thanks. I appreciate that it's still a keyboard-accessible option with the Raycast launcher.

l00sed avatar Aug 19 '24 15:08 l00sed