Skip to content

How to focus the closest prev space after destroying a space? #964

Answered by leandwo
leandwo asked this question in Q&A
Discussion options

You must be logged in to vote

I found a workaround but it feels jank beacuase the first screen flashes:

hyper - x:                                                                                                                                                                          
  current_space=$(yabai -m query --spaces --space | jq -r '.index'); \                                                                                                              
  yabai -m space --destroy; \                                                                                                                                                       
  yabai -m space --focus $((current_space - 1)) 

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@koekeishiya
Comment options

@leandwo
Comment options

@AurevoirXavier
Comment options

@AurevoirXavier
Comment options

@metafates
Comment options

Answer selected by leandwo
Comment options

You must be logged in to vote
1 reply
@Guth-Alak
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants