Move entire workspace #860
kenbankspeng
started this conversation in
feature-ideas
Replies: 1 comment
-
This is a script that can switch the windows between workspaces #!/bin/bash
FOCUSED_WORKSPACE=$(/opt/homebrew/bin/aerospace list-workspaces --focused)
FOCUSED_WORKSPACE_WINDOWS=$(/opt/homebrew/bin/aerospace list-windows --workspace focused --format "%{window-id}" --json)
TARGET_WORKSPACE=$1
TARGET_WORKSPACE_WINDOWS=$(/opt/homebrew/bin/aerospace list-windows --workspace "$TARGET_WORKSPACE" --format "%{window-id}" --json)
echo "$FOCUSED_WORKSPACE_WINDOWS " | jq -r '.[].["window-id"]' | xargs -I {} /opt/homebrew/bin/aerospace move-node-to-workspace "$TARGET_WORKSPACE" --fail-if-noop --window-id {}
echo "$TARGET_WORKSPACE_WINDOWS " | jq -r '.[].["window-id"]' | xargs -I {} /opt/homebrew/bin/aerospace move-node-to-workspace "$FOCUSED_WORKSPACE" --fail-if-noop --window-id {}
/opt/homebrew/bin/aerospace workspace "$TARGET_WORKSPACE" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Similar to move-node-to-workspace prev/next, I would request a swap-workspace-1, swap-workspace-2 ... swap-workspace-prev (or left/up), swap-workspace-next (or right/down). Swaps would involve the focused workspace and the command specified workspace.
My ordering of workspaces can change. Presently I do a ton of move-node-to-workspace commands to ripple windows through which could be a single command.
Beta Was this translation helpful? Give feedback.
All reactions