Skip to content

A simple program to show basic status of Yabai WM in status bar.

License

Notifications You must be signed in to change notification settings

ErwinLiYH/yabai_manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yabai manager

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:

  1. Three high-level interfaces to control Yabai's behavior
    1. Minimize all windows in the space (except the focused window) (and left the focued window)
    2. Deminimize all windows in the space (then refocus to original window)
    3. Toggle space's layout between bsp and float(, and maximize all windows after transferred to float layout)
  2. A manager in GUI (in status bar): shows the information of Yabai WM and calls these high-level interfaces
  3. A manager in CLI: calls these high-level interfaces
  4. 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

  1. Install Python

  2. Install Yabai

  3. Install skhd

  4. 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

Usage

Default key binds:

  1. option - p: toggle focused window to pip (picture in picture)

  2. option - t: toggle focused window between <float and center>/bsp

  3. option - f: toggle focused window to full screen(by grid command, used in float layout)

  4. option - z: toggle focused window to zoom full screen(used in bsp layout)

  5. option - w: make focused window to topbest

  6. option - s: make focused window to normal layer (revert to normal from topbest)

  7. option - a: make focused window to left-half

  8. option - d: make focused window to right-half

  9. shift + cmd - t: toggle layout of screen

    float -> bsp : change layout

    bsp -> float : change layout and full screen all windows

  10. shift + cmd - w: deminimize all windows in space and refocus to original window

  11. shift + cmd - s: minimize all unfocused windows in space

  12. 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:

About

A simple program to show basic status of Yabai WM in status bar.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published