yabai (with examples)

yabai (with examples)

  • Osx
  • November 5, 2023

Set the layout to bsp

Code:

yabai -m config layout bsp

Motivation: Setting the layout to bsp (binary space partitioning) allows for efficient utilization of screen space by dividing the available area into rectangular regions.

Explanation: The -m config flag is used to modify yabai’s configuration. The layout parameter is used to specify the desired layout. In this case, bsp is passed as the argument to set the layout to binary space partitioning.

Example Output: The windows on the screen will be dynamically split and resized according to the binary space partitioning algorithm.

Set the window gap to 10pt

Code:

yabai -m config window_gap 10

Motivation: Adjusting the window gap allows for fine-grained control over the spacing between windows, providing better clarity and visual separation.

Explanation: Similar to the previous example, the -m config flag is used to modify yabai’s configuration. The window_gap parameter is used to set the gap between windows. In this case, 10 is passed as the argument to set the window gap to 10 points.

Example Output: The gap between adjacent windows will be set to 10 points, creating a visual separation between them.

Enable opacity

Code:

yabai -m config window_opacity on

Motivation: Enabling window opacity can add a visually appealing effect to the windows, making the user interface more engaging and aesthetically pleasing.

Explanation: Again, the -m config flag is used to modify yabai’s configuration. The window_opacity parameter is used to enable or disable window opacity. In this case, on is passed as the argument to enable window opacity.

Example Output: The windows will have a translucent effect, allowing the content behind them to be partially visible.

Disable window shadow

Code:

yabai -m config window_shadow off

Motivation: Disabling window shadow can reduce visual clutter, making the windows appear more sleek and minimalist.

Explanation: Just like before, the -m config flag is used to modify yabai’s configuration. The window_shadow parameter is used to enable or disable window shadow. In this case, off is passed as the argument to disable window shadow.

Example Output: The windows will no longer have shadows, providing a cleaner and more understated look.

Enable status bar

Code:

yabai -m config status_bar on

Motivation: Enabling the status bar can provide valuable information, such as workspace names, system indicators, and other relevant details, allowing for easy monitoring of the system status.

Explanation: Similarly, the -m config flag is used to modify yabai’s configuration. The status_bar parameter is used to enable or disable the status bar. In this case, on is passed as the argument to enable the status bar.

Example Output: A status bar will be displayed, typically at the top or bottom of the screen, showing relevant information about the system and workspaces.

Conclusion

This article provides eight different use cases of the yabai command with code examples for each case. The use cases cover various aspects of configuring and customizing the behavior and appearance of the yabai tiling window manager for macOS. By understanding how to use these commands, users can tailor their window management experience to their preferences and enhance their overall productivity.

Tags :

Related Posts

How to use the command securityd (with examples)

How to use the command securityd (with examples)

The securityd command manages security contexts and cryptographic operations on macOS.

Read More
How to use the command 'trap' (with examples)

How to use the command 'trap' (with examples)

The command ’trap’ allows users to set up actions that are automatically executed when a process or the operating system receives a signal.

Read More
Introduction to RAR Command (with Examples)

Introduction to RAR Command (with Examples)

1: Archive 1 or more files RAR is a command-line archiving tool that allows users to compress and create multi-volume archives.

Read More