yabai-config/skhd/skhdrc

83 lines
3.9 KiB
Plaintext
Raw Normal View History

2023-03-06 01:24:40 +08:00
# skhdrc edited by Gbanyan, 2022/12/12
## Equalize size of windows (0x2A : "|")
alt + cmd - 0x2A : yabai -m space --balance
## full screen / un-full screen
alt + cmd - space : yabai -m window --toggle zoom-fullscreen
## focus window
alt + cmd - left : sh ~/.config/yabai/scripts/focusWindow.sh left
alt + cmd - right : sh ~/.config/yabai/scripts/focusWindow.sh right
alt + cmd - up : sh ~/.config/yabai/scripts/focusWindow.sh up
alt + cmd - down : sh ~/.config/yabai/scripts/focusWindow.sh down
# move window in floating mode
alt + cmd - home : yabai -m window --grid 2:2:0:0:1:1
alt + cmd - end : yabai -m window --grid 2:2:1:1:1:1
alt + cmd - pagedown : yabai -m window --grid 2:2:0:1:1:1
alt + cmd - pageup : yabai -m window --grid 2:2:1:0:1:1
## Enable / Disable gaps in current workspace
alt + cmd - g : yabai -m space --toggle padding; yabai -m space --toggle gap
## Rotate windows clockwise and anticlockwise
alt + cmd - r : yabai -m space --rotate 270
shift + alt + cmd - r : yabai -m space --rotate 90
## float / Unfloat window
ctrl + alt + cmd - space : yabai -m window --toggle float ; yabai -m window --grid 12:12:1:1:9:9
## stack window
# Note that this only works when the active window does *not* already belong to a stack
shift + alt + cmd - s : yabai -m space --layout stack
shift + alt + cmd - b : yabai -m space --layout bsp
shift + alt + cmd - left : yabai -m window west --stack $(yabai -m query --windows --window | jq -r '.id')
shift + alt + cmd - right : yabai -m window east --stack $(yabai -m query --windows --window | jq -r '.id')
shift + alt + cmd - up : yabai -m window south --stack $(yabai -m query --windows --window | jq -r '.id')
shift + alt + cmd - down : yabai -m window north --stack $(yabai -m query --windows --window | jq -r '.id')
# Focus window up/down in stack
shift + alt + cmd - up : yabai -m window --focus stack.prev || yabai -m window --focus stack.last
shift + alt + cmd - down : yabai -m window --focus stack.next || yabai -m window --focus stack.first
## swap window & move window in floating mode
ctrl + alt + cmd - left : yabai -m window --swap west
ctrl + alt + cmd - right : yabai -m window --swap east
ctrl + alt + cmd - up : yabai -m window --swap north
ctrl + alt + cmd - down : yabai -m window --swap south
## window resize
ctrl + alt + cmd - home : yabai -m window --resize left:-20:0 || yabai -m window --resize right:-20:0
ctrl + alt + cmd - end : yabai -m window --resize right:20:0 || yabai -m window --resize left:20:0
ctrl + alt + cmd - pageup : yabai -m window --resize top:0:-20 || yabai -m window --resize bottom:0:-20
ctrl + alt + cmd - pagedown : yabai -m window --resize top:0:20 || yabai -m window --resize bottom:0:20
alt + cmd - 3 : yabai -m window --ratio abs:0.66
## send window to next monitor and follow focus
ctrl + alt - left : sh ~/.config/yabai/scripts/moveWindowToLeft.sh display
ctrl + alt - right : sh ~/.config/yabai/scripts/moveWindowToRight.sh display
## send window to next space on and follow focus
ctrl + cmd - left : sh ~/.config/yabai/scripts/moveWindowToLeft.sh space
ctrl + cmd - right : sh ~/.config/yabai/scripts/moveWindowToRight.sh space
## send window to specify space
ctrl + cmd - 1 : sh ~/.config/yabai/scripts/moveWindowToLeft.sh 1
ctrl + cmd - 2 : sh ~/.config/yabai/scripts/moveWindowToLeft.sh 2
ctrl + cmd - 3 : sh ~/.config/yabai/scripts/moveWindowToLeft.sh 3
ctrl + cmd - 4 : sh ~/.config/yabai/scripts/moveWindowToLeft.sh 4
ctrl + cmd - 5 : sh ~/.config/yabai/scripts/moveWindowToLeft.sh 5
ctrl + cmd - 6 : sh ~/.config/yabai/scripts/moveWindowToLeft.sh 6
ctrl + cmd - 7 : sh ~/.config/yabai/scripts/moveWindowToLeft.sh 7
ctrl + cmd - 8 : sh ~/.config/yabai/scripts/moveWindowToLeft.sh 8
ctrl + cmd - 9 : sh ~/.config/yabai/scripts/moveWindowToLeft.sh 9
## focus display
ctrl + alt - 1 : yabai -m window --display 1 ; yabai -m display --focus 1
ctrl + alt - 2 : yabai -m window --display 2 ; yabai -m display --focus 2
ctrl + alt - 3 : yabai -m window --display 3 ; yabai -m display --focus 3