nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
3.43k stars 52 forks source link

Assign applications to open in workspace #302

Closed ostenning closed 1 week ago

ostenning commented 1 week ago

Is it possible to open certain apps automatically in a designated workspace? For example, I want firefox always to open in workspace 1, whilst I want my IDE in workspace 2 etc. At the moment, I open these apps and have to always resort them into their respective workspaces which is tiresome.

bcremer commented 1 week ago

This can be implemented using the on-window-detected-callbacks.

See: https://nikitabobko.github.io/AeroSpace/guide#on-window-detected-callback

[[on-window-detected]]
if.app-id = 'org.mozilla.firefox'
if.window-title-regex-substring = 'Picture-in-Picture'
run = 'layout floating'

[[on-window-detected]]
if.app-id = 'org.mozilla.firefox'
run = 'move-node-to-workspace 1'

[[on-window-detected]]
if.app-id = 'com.tinyspeck.slackmacgap'
run = 'move-node-to-workspace 3'

[[on-window-detected]]
if.app-id = 'com.jetbrains.PhpStorm'
run = 'move-node-to-workspace 2'