Last active
June 27, 2020 17:13
-
-
Save garbray/23aa2b02723621b6e6a49ca950028195 to your computer and use it in GitHub Desktop.
Config yabairc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# open a new item2 process | |
# cmd - return : /Applications/iTerm.app/Contents/MacOS/iTerm2 | |
# close all the iterm process | |
# cmd + shift - t : killall iTerm | |
# focus window | |
cmd + shift - h : yabai -m window --focus west | |
cmd + shift - j : yabai -m window --focus south | |
cmd + shift - k : yabai -m window --focus north | |
cmd + shift - l : yabai -m window --focus east | |
# swap window | |
cmd + alt + ctrl - h : yabai -m window --swap west | |
cmd + alt + ctrl - j : yabai -m window --swap south | |
cmd + alt + ctrl - k : yabai -m window --swap north | |
cmd + alt + ctrl - l : yabai -m window --swap east | |
cmd + alt + ctrl - 0 : yabai -m space --balance | |
# make floating window fill screen | |
cmd + alt + ctrl - 1 : yabai -m window --grid 1:1:0:0:1:1 | |
# fast focus desktop | |
cmd + alt + ctrl - up : yabai -m space --focus recent | |
cmd + alt + ctrl - right : yabai -m space --focus next | |
cmd + alt + ctrl - left : yabai -m space --focus prev | |
# resize window size | |
cmd - right : yabai -m window --resize right:20:0 | |
cmd - down : yabai -m window --resize bottom:0:20 | |
cmd - up : yabai -m window --resize top:0:-20 | |
cmd - left : yabai -m window --resize left:-20:0 | |
# rotate tree | |
cmd + alt + ctrl - r : yabai -m space --rotate 90 | |
# resize screen | |
cmd + alt + ctrl - m : yabai -m window --toggle zoom-parent | |
alt + shift - m : yabai -m window --toggle native-fullscreen | |
# move current app to the number | |
cmd + alt + ctrl - 1 : yabai -m window --space 1 | |
cmd + alt + ctrl - 2 : yabai -m window --space 2 | |
cmd + alt + ctrl - 3 : yabai -m window --space 3 | |
cmd + alt + ctrl - 4 : yabai -m window --space 4 | |
# create a new window | |
cmd + alt + ctrl - n : yabai -m space --create | |
# destroy current window | |
cmd + alt + ctrl - x : yabai -m space --destroy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
yabai -m config external_bar all:25:0 | |
yabai -m config mouse_follows_focus on | |
yabai -m config focus_follows_mouse off | |
yabai -m config window_topmost off | |
yabai -m config window_opacity on | |
yabai -m config window_opacity_duration 0.1 | |
yabai -m config active_window_opacity 1.0 | |
yabai -m config normal_window_opacity 1.0 | |
yabai -m config window_shadow float | |
yabai -m config split_ratio 0.5 | |
yabai -m config auto_balance off | |
yabai -m config mouse_modifier fn | |
yabai -m config mouse_action1 move | |
yabai -m config mouse_action2 resize | |
yabai -m config layout bsp | |
yabai -m config top_padding 0 | |
yabai -m config bottom_padding 0 | |
yabai -m config left_padding 0 | |
yabai -m config right_padding 0 | |
yabai -m config window_gap 0 | |
# Start with no gap or padding for all spaces | |
for space in $(yabai -m query --spaces | jq ".[] | .index") | |
do | |
yabai -m space $space --toggle padding | |
yabai -m space $space --toggle gap | |
done | |
# code | |
yabai -m space 1 --label "Code" | |
yabai -m rule --add app=kitty space=^"Code" | |
yabai -m rule --add app="Visual Studio Code" space=^"Code" | |
# preview | |
yabai -m space 2 --label "Preview" | |
yabai -m rule --add app="Google Chrome" space=^"Preview" | |
yabai -m rule --add app=Firefox space=^"Preview" | |
yabai -m rule --add app=Brave space=^"Preview" | |
yabai -m space 3 --label "Comms" | |
yabai -m rule --add app=Slack space=^"Comms" | |
# comms | |
yabai -m space 4 --label "Entertaiment" | |
yabai -m rule --add app=Spotify space=^"Entertaiment" | |
# calendar | |
yabai -m space 5 --label "Calendar" | |
yabai -m rule --add app="Calendar" space=^"Calendar" | |
# other | |
yabai -m space 6 --label "Others" | |
yabai -m rule --add app="Zwift" space=^"Others" | |
yabai -m rule --add app="TrainerRoad" space=^"Others" | |
yabai -m signal --add event=space_changed \ | |
action="osascript -e 'tell application \"UÃàbersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'" | |
yabai -m signal --add event=window_focused \ | |
action="osascript -e 'tell application \"UÃàbersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'" | |
yabai -m signal --add event=space_changed \ | |
action="osascript -e 'tell application \"UÃàbersicht\" to refresh widget id \"nibar-spaces-secondary-jsx\"'" | |
yabai -m signal --add event=window_focused \ | |
action="osascript -e 'tell application \"UÃàbersicht\" to refresh widget id \"nibar-spaces-secondary-jsx\"'" | |
echo "yabai cofiguration loaded..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment