QADXBPZPPIAICY2HTCAZSZYX33TG72CXI2XZOG3DCNMOIXAPWQMQC
YJA7TVYPLZCGRYUZVUTSW3I6BOO7EWGKNLWTMUV3VWVSF57B3JAQC
47GPXWYAN5HMMVVIWFEAY63MID4U2UHIBH4HNMDYWNQ2J6E2WX6AC
O64A6IJJGMWJYUDR6VUFGYFPWWPN222BEMMLFCMLKDEFO5OVRE4QC
MWV72ACT6D63U5I4UUNIO4WK7ZN3Q5WYRI72K3DCKCNWZ22QUR5AC
MAIEPZVQNNMHNN5MJ4UVPR5D7M3EE4B6QEBTR7L3KQERPUKOD5IQC
QRSG7RJSX5R255Y2HHTLYBXMBR374QS3PV2UJDWK2ZPMG7V66SSAC
#!/usr/bin/env sh
yabai -m config window_placement second_child
yabai -m config window_topmost on
yabai -m config window_shadow float
yabai -m config window_border off
yabai -m config window_opacity off
yabai -m config window_border off
yabai -m config insert_feedback_color 0xffd75f5f
yabai -m config split_ratio 0.50
yabai -m config auto_balance on
yabai -m config mouse_drop_action swap
yabai -m config layout bsp
yabai -m config top_padding 6
yabai -m config bottom_padding 6
yabai -m config left_padding 6
yabai -m config right_padding 6
yabai -m config window_gap 6
# allow windows from these applications to float
yabai -m rule --add app="^System Information$" manage=off
yabai -m rule --add app="^System Preferences$" manage=off
yabai -m rule --add app="^Karabiner-Elements$" manage=off
yabai -m rule --add app="^Disk Utility$" manage=off
yabai -m rule --add app="^Flux$" manage=off
yabai -m rule --add app="^Messages$" manage=off
# float iterm window that emulate guake (floats from bottom)
yabai -m rule --add app='^iTerm2$' title="^Hotkey Window$" manage=off
echo "$(date "+%Y-%m-%d %H:%M:%s") - yabai configuration loaded..."
yabai -m rule --add app='sure-zooms' manage=off
###################
# WINDOW MANAGEMENT
###################
# -- focusing within the current "space" --
hyper - h : yabai -m window --focus west
hyper - j : yabai -m window --focus south
hyper - k : yabai -m window --focus north
hyper - l : yabai -m window --focus east
{ pkgs, ... }:
# -- rearraging within the current "space" --
cmd + alt - h : yabai -m window --warp west
cmd + alt - j : yabai -m window --warp south
cmd + alt - k : yabai -m window --warp north
cmd + alt - l : yabai -m window --warp east
{
cmd + alt - r : yabai -m space --mirror y-axis
cmd + alt + shift - r : yabai -m space --rotate 90
xdg.configFile."skhd/skhdrc".text = ''
#############################################################
# Generated by home-manager from nixpkgs.skhdrc in ~/dotfiles
# For skhd info see: https://github.com/koekeishiya/skhd
#############################################################
# -- resizing --
cmd + alt - 0 : yabai -m space --balance
cmd + alt - f : yabai -m window --toggle zoom-fullscreen
cmd + alt + shift - f : yabai -m window --toggle zoom-parent
hyper - 0x18 : yabai -m window --toggle zoom-parent
###################
# WINDOW MANAGEMENT
###################
# -- focusing within the current "space" --
hyper - h : yabai -m window --focus west
hyper - j : yabai -m window --focus south
hyper - k : yabai -m window --focus north
hyper - l : yabai -m window --focus east
# uses brackets left: [ right: ]
cmd + alt - 0x21 : yabai -m window --resize left:-20:0
cmd + alt + shift - 0x21 : yabai -m window --resize left:20:0
cmd + alt - 0x1E : yabai -m window --resize right:20:0
cmd + alt + shift - 0x1E : yabai -m window --resize right:-20:0
# uses + and -
cmd + alt - 0x1B : yabai -m window --resize top:0:20
cmd + alt +shift - 0x1B : yabai -m window --resize top:0:-20
cmd + alt - 0x18 : yabai -m window --resize bottom:0:20
cmd + alt + shift - 0x18 : yabai -m window --resize bottom:0:-20
# -- rearraging within the current "space" --
cmd + alt - h : yabai -m window --warp west
cmd + alt - j : yabai -m window --warp south
cmd + alt - k : yabai -m window --warp north
cmd + alt - l : yabai -m window --warp east
# floating window to left half & right half
cmd + alt - left : yabai -m window --grid 1:2:0:0:1:1
cmd + alt - right : yabai -m window --grid 1:2:1:0:1:1
# -- change split type of focused window --
cmd + alt - e : yabai -m window --toggle split
# -- resizing --
cmd + alt - 0 : yabai -m space --balance
cmd + alt - f : yabai -m window --toggle zoom-fullscreen
cmd + alt + shift - f : yabai -m window --toggle zoom-parent
hyper - 0x18 : yabai -m window --toggle zoom-parent
# -- moving to another "space" on the current display --
cmd + alt - 1 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 1; yabai -m window --focus $wid
cmd + alt - 2 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 2; yabai -m window --focus $wid
cmd + alt - 3 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 3; yabai -m window --focus $wid
cmd + alt - 4 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 4; yabai -m window --focus $wid
cmd + alt - 5 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 5; yabai -m window --focus $wid
cmd + alt - 6 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 6; yabai -m window --focus $wid
cmd + alt - 7 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 7; yabai -m window --focus $wid
cmd + alt - 8 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 8; yabai -m window --focus $wid
# uses brackets left: [ right: ]
cmd + alt - 0x21 : yabai -m window --resize left:-20:0
cmd + alt + shift - 0x21 : yabai -m window --resize left:20:0
cmd + alt - 0x1E : yabai -m window --resize right:20:0
cmd + alt + shift - 0x1E : yabai -m window --resize right:-20:0
# uses + and -
cmd + alt - 0x1B : yabai -m window --resize top:0:20
cmd + alt +shift - 0x1B : yabai -m window --resize top:0:-20
cmd + alt - 0x18 : yabai -m window --resize bottom:0:20
cmd + alt + shift - 0x18 : yabai -m window --resize bottom:0:-20
# -- floating windows --
cmd + alt + ctrl - f : yabai -m window --toggle float; \
yabai -m window --grid 4:4:1:1:2:2
# floating window to left half & right half
cmd + alt - left : yabai -m window --grid 1:2:0:0:1:1
cmd + alt - right : yabai -m window --grid 1:2:1:0:1:1
# -- moving to another "space" on the current display --
cmd + alt - 1 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 1; yabai -m window --focus $wid
cmd + alt - 2 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 2; yabai -m window --focus $wid
cmd + alt - 3 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 3; yabai -m window --focus $wid
cmd + alt - 4 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 4; yabai -m window --focus $wid
cmd + alt - 5 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 5; yabai -m window --focus $wid
cmd + alt - 6 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 6; yabai -m window --focus $wid
cmd + alt - 7 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 7; yabai -m window --focus $wid
cmd + alt - 8 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 8; yabai -m window --focus $wid
# -- moving to another to another display --
cmd + ctrl - 1 : yabai -m window --display 1; yabai -m display --focus 1
cmd + ctrl - 2 : yabai -m window --display 2; yabai -m display --focus 2
cmd + ctrl - 3 : yabai -m window --display 3; yabai -m display --focus 3
# -- moving to another to another display --
cmd + ctrl - 1 : yabai -m window --display 1; yabai -m display --focus 1
cmd + ctrl - 2 : yabai -m window --display 2; yabai -m display --focus 2
cmd + ctrl - 3 : yabai -m window --display 3; yabai -m display --focus 3
# -- focus another display --
hyper - 1 : yabai -m display --focus 1
hyper - 2 : yabai -m display --focus 2
hyper - 3 : yabai -m display --focus 3
hyper - b : yabai -m display --focus prev || yabai -m display --focus recent
hyper - n : yabai -m display --focus next || yabai -m display --focus recent
# -- focus another display --
hyper - 1 : yabai -m display --focus 1
hyper - 2 : yabai -m display --focus 2
hyper - 3 : yabai -m display --focus 3
hyper - b : yabai -m display --focus prev || yabai -m display --focus recent
hyper - n : yabai -m display --focus next || yabai -m display --focus recent
# -- stack windows onto each other
shift + cmd - b : yabai -m window --focus stack.prev || yabai -m window --focus stack.last
shift + cmd - n : yabai -m window --focus stack.next || yabai -m window --focus stack.first
shift + cmd - h : yabai -m window --stack west
shift + cmd - j : yabai -m window --stack south
shift + cmd - k : yabai -m window --stack north
shift + cmd - l : yabai -m window --stack east
# -- stack windows onto each other
shift + cmd - b : yabai -m window --focus stack.prev || yabai -m window --focus stack.last
shift + cmd - n : yabai -m window --focus stack.next || yabai -m window --focus stack.first
shift + cmd - h : yabai -m window --stack west
shift + cmd - j : yabai -m window --stack south
shift + cmd - k : yabai -m window --stack north
shift + cmd - l : yabai -m window --stack east
'';
}