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

How to create new Space? #52

Closed
h4ckd0tm3 opened this issue May 24, 2024 · 3 comments
Closed

How to create new Space? #52

h4ckd0tm3 opened this issue May 24, 2024 · 3 comments

Comments

@h4ckd0tm3
Copy link

Was already asked in #50 but closed without clarifying how to actually create a new space.
Might just me being stupid but I really can't find it ^^'.

Thank you in advance!

@starboi-63
Copy link

starboi-63 commented Jun 7, 2024

Not sure if this helps, but I use skhd with the following keybinds for spaces:

## Navigation (lalt - ...)
# Create a new space: lalt + n
lalt - n : yabai -m space --create

# Move to previous/next space: lalt - {i, o}
lalt - i : yabai -m space --focus prev
lalt - o : yabai -m space --focus next

# Delete the current space: lalt + w
lalt - w : yabai -m space --destroy

# Space Navigation (four spaces per display): lalt - {1, 2, 3, 4}
lalt - 1 : SPACES=($(yabai -m query --displays --display | jq '.spaces[]')) && [[ -n $SPACES[1] ]] && yabai -m space --focus $SPACES[1]
lalt - 2 : SPACES=($(yabai -m query --displays --display | jq '.spaces[]')) && [[ -n $SPACES[2] ]] && yabai -m space --focus $SPACES[2]
lalt - 3 : SPACES=($(yabai -m query --displays --display | jq '.spaces[]')) && [[ -n $SPACES[3] ]] && yabai -m space --focus $SPACES[3]
lalt - 4 : SPACES=($(yabai -m query --displays --display | jq '.spaces[]')) && [[ -n $SPACES[4] ]] && yabai -m space --focus $SPACES[4]

So, lalt + n in this case would create a new space. But really, you should be able to click on the right arrow between the spaces and front_app:

image

@h4ckd0tm3
Copy link
Author

Not sure if this helps, but I use skhd with the following keybinds for spaces:

## Navigation (lalt - ...)
# Create a new space: lalt + n
lalt - n : yabai -m space --create

# Move to previous/next space: lalt - {i, o}
lalt - i : yabai -m space --focus prev
lalt - o : yabai -m space --focus next

# Delete the current space: lalt + w
lalt - w : yabai -m space --destroy

# Space Navigation (four spaces per display): lalt - {1, 2, 3, 4}
lalt - 1 : SPACES=($(yabai -m query --displays --display | jq '.spaces[]')) && [[ -n $SPACES[1] ]] && yabai -m space --focus $SPACES[1]
lalt - 2 : SPACES=($(yabai -m query --displays --display | jq '.spaces[]')) && [[ -n $SPACES[2] ]] && yabai -m space --focus $SPACES[2]
lalt - 3 : SPACES=($(yabai -m query --displays --display | jq '.spaces[]')) && [[ -n $SPACES[3] ]] && yabai -m space --focus $SPACES[3]
lalt - 4 : SPACES=($(yabai -m query --displays --display | jq '.spaces[]')) && [[ -n $SPACES[4] ]] && yabai -m space --focus $SPACES[4]

So, lalt + n in this case would create a new space. But really, you should be able to click on the right arrow between the spaces and front_app:

image

Thanks for sharing! I am currently using the new Lua based config, which is missing the arrow and I could not find a replacement for that yet. Will probably use ur approach with the key bindings!

Thanks!

@starboi-63
Copy link

Of course!

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