nikitabobko / AeroSpace

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

How to switch to other workspace and change layout to accordion on window detect? #467

Open AlejandroSanchez90 opened 2 weeks ago

AlejandroSanchez90 commented 2 weeks ago

sometimes i run tests on my job, it will open a new window and place it on workspace 3, so far this is working good, but i also want to switch that workspace layout to accordion, so if im in workspace 2 and launch test then my workspace 3 will switch to accordeon and also move that window to that workspace

Checklist

<!-- Replace with `aerospace --version` output -->
hwamil commented 2 weeks ago

I'm not quite understanding what you mean. Do you want to stay in workspace 2 while sending the window to workspace 3? Or do you want to switch to workspace 3? Or do you mean you want to send the window in workspace 2 to workspace 3 when your testing window is detected? If it's the last one, it may not be possible at the moment since [[on-window-detected]] will only execute commands on the detected window and no other, and it does not yet (or ever) allow for running custom scripts.

Anyway, you can run a list of commands when using [[on-window-detected]].

[[on-window-detected]]
if.app-id = 'your.testing.app'
run = ['move-node-to-workspace 3', 'workspace 3', 'layout accordion vertical', 'workspace 2', ...]
AlejandroSanchez90 commented 2 weeks ago

Those commands wont work, when I save that aerospace yells saying that the only run command I can have is layout tiling float, and move node to workspace, other commands are not allowed

Let's say I'm on ws 2 (This is my main ws where I work) sometimes I open my testing program which I want to be on ws 3, in ws 3 I have my browser so I want this workspace to become layout acordeon when I launch my testing program

On Wed, Aug 28, 2024, 7:29 PM ultaro @.***> wrote:

I'm not quite understanding what you mean. Do you want to stay in workspace 2 while sending the window to workspace 3? Or do you want to switch to workspace 3?

Anyway, you can run a list of commands when using [[on-window-detected]].

[[on-window-detected]] if.app-id = 'your.testing.app' run = ['move-node-to-workspace 3', 'workspace 3', 'layout accordion', 'workspace 2', ...]

— Reply to this email directly, view it on GitHub https://github.com/nikitabobko/AeroSpace/issues/467#issuecomment-2316488339, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6NKLATQQHF54HTCXV3WE4LZTZTOPAVCNFSM6AAAAABNINKYAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJWGQ4DQMZTHE . You are receiving this because you authored the thread.Message ID: @.***>

hwamil commented 2 weeks ago

Those commands wont work, when I save that aerospace yells saying that the

only run command I can have is layout tiling float, and move node to

workspace, other commands are not allowed

Oh right, yeah. Layout accordion isn't supported yet.

Mind that Aerospace is still in beta and may not support everything that it is capable of.

danfbfern commented 2 weeks ago

Anyway, you can run a list of commands when using [[on-window-detected]].

[[on-window-detected]]
if.app-id = 'your.testing.app'
run = ['move-node-to-workspace 3', 'workspace 3', 'layout accordion vertical', 'workspace 2', ...]

This would be a great addition, eventually supporting every command in [[on-window-detected]] just like is supported everywhere else would be awesome.

jakenvac commented 1 week ago

From what I can gather you want to Lift limitations in on-window-detected.run. If that's the case, perhaps close this issue and add to the discussion there.

As an aside, the checklist in the issue template is there for a reason. The section of the guide that covers on-window-detected specifically references the issue I linked above.