A simple python program to show basic status of Yabai WM in status bar based on rumps with some high-level interfaces based on Yabai.
This program include:
- Three high-level interfaces to control Yabai's behavior
- Minimize all windows in the space (except the focused window) (and left the focued window)
- Deminimize all windows in the space (then refocus to original window)
- Toggle space's layout between bsp and float(, and maximize all windows after transferred to float layout)
- A manager in GUI (in status bar): shows the information of Yabai WM and calls these high-level interfaces
- A manager in CLI: calls these high-level interfaces
- Default configuration files(.skhdrc & .yabairc) integrated with the manager
contents in () are default behavior in status bar, but optional in CLI.
With multiple display:
|<space index in display>:<space count in display>|<space index in total>:<space count in total>|<float('F'loat) or bsp('T'ile) of current space>|
With single display:
|<space index>:<space count>|<float('F'loat) or bsp('T'ile) of current space>|
-
Install Python
-
Install Yabai
-
Install skhd
-
Install the configs and Yabai manager
This app requires a Python environment. If you prefer not to use the system's Python environment, you should create a new virtual Python environment.
git clone git@github.com:ErwinLiYH/yabai_manager.git cd yabai_manager # Install manager pip install -e . # Install default config, optional cp -a default_config/.skhdrc ~/.skhdrc cp -a default_config/.yabairc ~/.yabairc #or ln -s $(pwd)/default_config/.skhdrc ~/.skhdrc ln -s $(pwd)/default_config/.yabairc ~/.yabairc
Default key binds:
-
option - p
: toggle focused window to pip (picture in picture) -
option - t
: toggle focused window between <float and center>/bsp -
option - f
: toggle focused window to full screen(by grid command, used in float layout) -
option - z
: toggle focused window to zoom full screen(used in bsp layout) -
option - w
: make focused window to topbest -
option - s
: make focused window to normal layer (revert to normal from topbest) -
option - a
: make focused window to left-half -
option - d
: make focused window to right-half -
shift + cmd - t
: toggle layout of screenfloat -> bsp : change layout
bsp -> float : change layout and full screen all windows
-
shift + cmd - w: deminimize all windows in space and refocus to original window
-
shift + cmd - s: minimize all unfocused windows in space
-
shift + cmd + alt - r
: restart Yabai and manager
GUI interface:
CLI interface:
$yabai-manager-cli --help
usage: yabai-manager-cli [-h] [--version] [--startGUI] [--quitGUI] [--restartGUI] {windows,space} ...
Yabai manager CLI
positional arguments:
{windows,space} sub-command help
windows deminimize/minimize all windows in space
space toggle space layout
options:
-h, --help show this help message and exit
--version show version
--startGUI start yabai manager GUI
--quitGUI quit yabai manager GUI
--restartGUI restart yabai manager GUI
$yabai-manager-cli windows --help
usage: yabai-manager-cli windows [-h] [--deminimize] [--minimize] [--refocus] [--except_focus] [--full_screen] [--left_focus]
options:
-h, --help show this help message and exit
--deminimize, -dm deminimize all windows in space
--minimize, -mn minimize all windows in space
--refocus, -r refocus the last focused window when deminimizing all windows in space
--except_focus, -e except the focused window when minimizing all windows in space
--full_screen, -f full screen all windows when deminimizing all windows in space
--left_focus, -l left focus the last focused window when minimizing all windows in space
$yabai-manager-cli space --help
usage: yabai-manager-cli space [-h] [--toggle] [--float2max]
options:
-h, --help show this help message and exit
--toggle, -t toggle space layout
--float2max, -mx flotating windows to max when toggling space layout
Customize status bar: