Skip to content

Yabai and SHKD Integration

Shrey Choudhary edited this page Dec 11, 2020 · 9 revisions

Yabai and SHKD Integration

  1. open the .yabairc file and add the following at the bottom. See example .yabairc file if you are confused.
yabai -m signal --add event=space_changed action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_added action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_removed action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_changed action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_moved action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"

This adds rules that refresh the yabai plugin whenever the space is changed, display is added, removed, changed, or moved.

  1. open the .skhdrc file and append

&& open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'

to the

create desktop, move window and follow focus,

create desktop and follow focus,

destroy desktop,

fast focus desktop,

send window to desktop and follow focus,

send window to monitor and follow focus,

Move space left,

Move space right, and

focus monitor

hotkeys.

  1. Append the following lines to your .yabairc
yabai -m signal --add event=space_changed action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_added action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_removed action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_changed action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_moved action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=mission_control_exit action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=system_woke action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
  1. If you want to enable WINTYPE to see the management status of the current window you need to append the following line to your .yabairc

yabai -m signal --add event=window_focused="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"

and add && open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh' to the toggle float hotkey in your .skhdrc file

See example .skhdrc file if you are confused.

This refreshes the plugin whenever you enter the shortcut for creating, destroying, moving, or focusing spaces. If you changed the file name to update more often, that needs to be reflected here.

Clone this wiki locally