Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep app in workspace in after-startup command #214

Closed
glepnir opened this issue May 6, 2024 · 2 comments
Closed

keep app in workspace in after-startup command #214

glepnir opened this issue May 6, 2024 · 2 comments

Comments

@glepnir
Copy link

glepnir commented May 6, 2024

currently i use this config, it will open kitty and chrome on workspace 3 because seems like it start application async when i open kitty current workspace is focused on 3 , but i want keep the kitty in workspace 1 chrome in workspace 3.

after-startup-command = [
  'workspace 1',
  'exec-and-forget open -n /Applications/kitty.app',
  'workspace 3',
  'exec-and-forget open -n /Applications/Google\ Chrome.app',
]
@glepnir glepnir changed the title keep app in worspace in after-startup command keep app in workspace in after-startup command May 6, 2024
@nikitabobko
Copy link
Owner

nikitabobko commented May 15, 2024

You can do this:

after-startup-command = [
  'exec-and-forget open -n /Applications/kitty.app && sleep 1 && aerospace move-node-to-workspace 1 ',
  'exec-and-forget open -n /Applications/Google\ Chrome.app && sleep 1 && aerospace move-node-to-workspace 3',
]

Please note sleep 1. It's needed because open finishes faster than the window appears. Please follow #226 for updates on "sleep 1" problem

@glepnir
Copy link
Author

glepnir commented May 15, 2024

make sense.

@glepnir glepnir closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants