You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my work laptop, I commonly change between one of three display configurations:
Office (laptop and one large external monitor)
Home office (laptop closed, two large external monitors)
Coffee shop (laptop only)
What I would like to do is assign windows to workspaces (via on-window-detected), and then assign workspaces to monitors. So something like workspace-to-monitor-force-assignment seems like what I want, but I need the workspace<->monitor mapping to change dynamically based on which of these display configurations is active.
Is there currently a way to do this with AeroSpace? I previously had a working Yabai config that did this, but I can't use it due to my work laptop not allowing disabling SIP.
If this isn't currently supported, here is an idea of how it could work:
If aerospace move-workspace-to-monitor accepted identifiers for which workspace to move to which monitor, rather than relying solely on the current focus state, it would be easy to write a organize-workspaces.sh script. Something like this:
`organize-workspaces.sh`
#!/bin/bash# These were obtained by plugging in the appropriate# monitors and running `aerospace list-monitors | pbcopy`
LAPTOP_MODE='1 | Built-in Retina Display'
HOME_OFFICE_MODE='1 | DELL U2720Q2 | DELL S2721DGF'
OFFICE_MODE='1 | Built-in Retina Display2 | DELL U2720Q'
CURRENT_MODE="$(aerospace list-monitors)"case$CURRENT_MODEin$LAPTOP_MODE)
# Don't need to do anything here because everything should auto-move to the only existing display
;;
$HOME_OFFICE_MODE)
aerospace move-workspace-to-monitor --workspace "code" --monitor "DELL U2720Q"
aerospace move-workspace-to-monitor --workspace "term" --monitor "DELL U2720Q"
aerospace move-workspace-to-monitor --workspace "slack" --monitor "DELL S2721DGF"
aerospace move-workspace-to-monitor --workspace "browse" --monitor "DELL S2721DGF"
;;
$OFFICE_MODE)
aerospace move-workspace-to-monitor --workspace "code" --monitor "DELL U2720Q"
aerospace move-workspace-to-monitor --workspace "term" --monitor "DELL U2720Q"
aerospace move-workspace-to-monitor --workspace "slack" --monitor "Built-in Retina Display"
aerospace move-workspace-to-monitor --workspace "browse" --monitor "Built-in Retina Display"
;;
esac
And then I'd just need to either manually run this script when changing displays, which isn't too annoying, or figure out some way to automatically trigger it.
Checklist
I've searched for duplicates. My search queries were (please don't forget to search in closed issues too):
(1) You can specify multiple patterns as an array in workspace-to-monitor-force-assignment. The first matching pattern will be used. If monitor is not presented, the pattern matches nothing. It's sufficient for some cases of different monitor configurations
If aerospace move-workspace-to-monitor accepted identifiers for which workspace to move to which monitor, rather than relying solely on the current focus state
On my work laptop, I commonly change between one of three display configurations:
What I would like to do is assign windows to workspaces (via
on-window-detected
), and then assign workspaces to monitors. So something likeworkspace-to-monitor-force-assignment
seems like what I want, but I need the workspace<->monitor mapping to change dynamically based on which of these display configurations is active.Is there currently a way to do this with AeroSpace? I previously had a working Yabai config that did this, but I can't use it due to my work laptop not allowing disabling SIP.
If this isn't currently supported, here is an idea of how it could work:
If
aerospace move-workspace-to-monitor
accepted identifiers for which workspace to move to which monitor, rather than relying solely on the current focus state, it would be easy to write aorganize-workspaces.sh
script. Something like this:`organize-workspaces.sh`
`aerospace.toml`
And then I'd just need to either manually run this script when changing displays, which isn't too annoying, or figure out some way to automatically trigger it.
Checklist
I've searched for duplicates. My search queries were (please don't forget to search in closed issues too):
I've read the documentation https://nikitabobko.github.io/AeroSpace/guide & https://nikitabobko.github.io/AeroSpace/commands
I've searched in the documentation. My search queries were:
The text was updated successfully, but these errors were encountered: