bash: get layout > create toggle function #1050
-
|
Hi there, I am quite new to yabai and I am wondering if it is possible to get the yabai layout in a bash script and eg. check if layout is stack and then toggle The reason why I am asking is because I am using kmonad for mapping my keyboard, and if I map a key to a yabai command |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
|
A simple one-liner will suffice. [ "$(yabai -m query --spaces --space | jq -r '.type')" = "stack" ] && yabai -m space --layout bspFor the global layout: [ "$(yabai -m config layout)" = "stack" ] && yabai -m config layout bsp |
Beta Was this translation helpful? Give feedback.
A simple one-liner will suffice.
For setting the space layout:
For the global layout: