Change focus after creating new space #2076
Answered
by
koekeishiya
amlanjlahkar
asked this question in
Q&A
-
I'm trying to make yabai focus the new space after its creation. In my config I've this:
focus_space script #!/bin/sh
space_index=$(yabai -m query --spaces | jq ".[] | select(.id == $1) | .index")
yabai -m space --focus $space_index I checked the error log and apparently |
Beta Was this translation helpful? Give feedback.
Answered by
koekeishiya
Feb 2, 2024
Replies: 1 comment
-
You need to escape the variable so that it is passed along as part of the script instead of being evaluated in the .yabairc script.
You may also need to include the full path to the focus_space script, unless it is located somewhere in your $PATH. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
amlanjlahkar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to escape the variable so that it is passed along as part of the script instead of being evaluated in the .yabairc script.
You may also need to include the full path to the focus_space script, unless it is located somewhere in your $PATH.