-
Notifications
You must be signed in to change notification settings - Fork 5
/
.yabairc
executable file
·93 lines (75 loc) · 3 KB
/
.yabairc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env sh
# see this wiki page for information:
# - https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa
# current config modified from
# https://cbrgm.net/post/2021-05-5-setup-macos/
function setup_space {
local idx="$1"
local name="$2"
local space=
echo "setup space $idx : $name"
space=$(yabai -m query --spaces --space "$idx")
if [ -z "$space" ]; then
yabai -m space --create
fi
yabai -m space "$idx" --label "$name"
}
setup_space 1 web
setup_space 2 code
setup_space 3 plan
setup_space 4 communication
setup_space 5 apple
setup_space 6 music
yabai -m config --space 6 layout float
setup_space 7 games
yabai -m config --space 7 layout float
setup_space 8 stream
yabai -m config --space 8 layout float
# bar settings
yabai -m config top_padding 0
# global settings
yabai -m config mouse_follows_focus off
yabai -m config focus_follows_mouse off
yabai -m config window_placement second_child
yabai -m config window_topmost off
yabai -m config window_opacity off
yabai -m config window_opacity_duration 0.0
yabai -m config window_shadow on
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.90
yabai -m config split_ratio 0.50
yabai -m config auto_balance off
# Mouse support
yabai -m config mouse_modifier alt
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
# general space settings
yabai -m config layout bsp
yabai -m config top_padding 10
yabai -m config bottom_padding 10
yabai -m config left_padding 10
yabai -m config right_padding 10
yabai -m config window_gap 10
# float system preferences
yabai -m rule --add app='^System Information$' manage=off
yabai -m rule --add app='^Microsoft Teams$' manage=off
yabai -m rule --add app='^System Preferences$' manage=off
yabai -m rule --add app='^System Settings$' manage=off
yabai -m rule --add title='Preferences$' manage=off
# float certain applications
yabai -m rule --add app='^Cisco' manage=off
#yabai -m rule --add app='^Bitwarden$' manage=off
# Web browsers
yabai -m rule --add app="^(Firefox)$" space=^1
yabai -m rule --add app="^(Wezterm|WezTerm)$" space=^2
yabai -m rule --add app="^(Google Chrome|Asana)$" space=^3
yabai -m rule --add app="^(Slack|Google Meet)$" space=^4
yabai -m rule --add app="^(Mail|Calendar)$" space=^5
yabai -m rule --add app="^(Spotify|Messages|Signal|Messenger)$" space=^6
yabai -m rule --add app="^(Discord|Battle.net|World of Warcraft|Hearthstone|Riot Client|League of Legends|League of Legends (TM) Client)$" space=^7
yabai -m rule --add app="^(Safari)$" space=^8
# Bitwarden on top
yabai -m rule --add app="^Bitwarden$" sticky=on layer=above manage=off
echo "yabai configuration loaded.."