-
Notifications
You must be signed in to change notification settings - Fork 15
/
yabairc
executable file
·154 lines (136 loc) · 7.15 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#!/usr/bin/env sh
# yabai
# ---
# See: https://github.com/koekeishiya/yabai/wiki/Configuration
# https://github.com/koekeishiya/yabai/blob/master/doc/yabai.asciidoc
#
# Reload: yabai --restart-service
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
# Reload when displays change
yabai -m signal --add event=display_added action="yabai --restart-service"
yabai -m signal --add event=display_removed action="yabai --restart-service"
yabai -m signal --add event=display_resized action="yabai --restart-service"
yabai -m signal --add event=display_moved action="yabai --restart-service"
# external_bar all:35:0 \
# normal_window_opacity 0.95 \
yabai -m config \
external_bar all:0:0 \
mouse_follows_focus off \
focus_follows_mouse off \
window_zoom_persist off \
window_placement second_child \
window_topmost off \
window_shadow float \
window_opacity on \
window_opacity_duration 0.2 \
active_window_opacity 1.0 \
normal_window_opacity 1.0 \
window_animation_duration 0.0 \
insert_feedback_color 0xff9dd274 \
split_ratio 0.50 \
auto_balance off \
auto_padding on \
mouse_modifier fn \
mouse_action1 move \
mouse_action2 resize \
mouse_drop_action swap \
\
top_padding 8 \
bottom_padding 8 \
left_padding 8 \
right_padding 8 \
window_gap 8
yabai -m rule --add app="^(LuLu|Calculator|Software Update|Dictionary|VLC|System Preferences|System Settings|zoom.us|Photo Booth|Archive Utility|Python|LibreOffice|App Store|Steam|Alfred|Activity Monitor)$" manage=off
yabai -m rule --add label="Finder" app="^Finder$" title="(Co(py|nnect)|Move|Info|Pref)" manage=off
yabai -m rule --add label="Safari" app="^Safari$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off
yabai -m rule --add label="About This Mac" app="System Information" title="About This Mac" manage=off
yabai -m rule --add label="Select file to save to" app="^Inkscape$" title="Select file to save to" manage=off
# global settings
# yabai -m config window_origin_display focused
# yabai -m config window_opacity off
# yabai -m config active_window_opacity 1.0
# yabai -m config normal_window_opacity 0.8
# # yabai -m config window_opacity_duration 0.0
# yabai -m config window_animation_duration 0.0
# Global space settings
# 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 5
# Override gaps for specific spaces only
# yabai -m config --space 1 window_gap 0
# yabai -m config --space 2 window_gap 0
# Space assignments
# yabai -m rule --add app='^(Alacritty|kitty)$' space=1
# yabai -m rule --add app='^Google Chrome$' space=2
# yabai -m rule --add app='^Arc$' space=2
# yabai -m rule --add app='^Slack$' space=3
# yabai -m rule --add app='^Messages$' space=3
# yabai -m rule --add app='^Telegram$' space=3
# yabai -m rule --add app='^Spotify$' space=4
# yabai -m rule --add app='^Music$' space=4
# yabai -m rule --add app='^Microsoft Outlook' space=5
# yabai -m rule --add app='^zoom.us$' space=5
# # 7-8-2022: Doesn't work well, SIP is enabled.
# # Maybe will work in newer version or SIP disabled?
# # ---
yabai -m signal --add event=application_launched app='^(Alacritty|kitty)$' \
action="yabai -m space --focus 1"
yabai -m signal --add event=application_launched app='^Google Chrome$' \
action="yabai -m space --focus 2"
yabai -m signal --add event=application_launched app='^(Slack|Messages|Telegram|WhatsApp)$' \
action="yabai -m space --focus 3"
yabai -m signal --add event=application_launched app='^(Spotify|Music)$' \
action="yabai -m space --focus 4"
yabai -m signal --add event=application_launched app='^Microsoft Outlook' \
action="yabai -m space --focus 5"
yabai -m signal --add event=application_launched app='^zoom.us$' \
action="yabai -m space --focus 5"
# System
# yabai -m rule --add app='^Help Viewer$' manage=off
# yabai -m rule --add app='^Installer$' manage=off
# yabai -m rule --add app='^Reminders$' manage=off
# yabai -m rule --add app='^System Information$' manage=off
# yabai -m rule --add title='Updating ' manage=off
# yabai -m rule --add title='^Picture in Picture$' manage=off
# Apps
yabai -m rule --add app='^ATV Remote$' manage=off
yabai -m rule --add app='^Bartender .$' manage=off
yabai -m rule --add app='^Beyond Compare$' manage=off
yabai -m rule --add app='^Calendar$' manage=off
yabai -m rule --add app='^ColorSlurp$' manage=off
yabai -m rule --add app='^Contexts$' manage=off
yabai -m rule --add app='^Dozer$' manage=off
yabai -m rule --add app='^FortiClient$' manage=off
yabai -m rule --add app='^Gauntlet$' manage=off
yabai -m rule --add app='^JuxtaCode$' manage=off
yabai -m rule --add app='^Kap$' manage=off
yabai -m rule --add app='^Karabiner-Elements$' manage=off
yabai -m rule --add app='^Maccy$' manage=off
yabai -m rule --add app='^Monosnap$' manage=off
yabai -m rule --add app='^Pixelmator' manage=off
yabai -m rule --add app='^Plexamp' manage=off
yabai -m rule --add app='^Raycast$' manage=off
yabai -m rule --add app='^Reminders$' manage=off
yabai -m rule --add app='^QuickRecorder$' manage=off
yabai -m rule --add app='^qView$' manage=off
# yabai -m rule --add app='^Slack$' title='^Slack \| mini panel$' manage=off
# yabai -m rule --add app='^Slack$' title='^Threads - ' manage=off
# yabai -m rule --add app='^Slack$' title='^Slack - Huddle$' manage=off
# Placement
yabai -m rule --add app='^App Store$' grid=24:24:1:1:22:22
yabai -m rule --add app='^Dictionary$' grid=24:24:15:1:8:14
yabai -m rule --add app='^Docker Desktop$' manage=off grid=4:4:1:1:2:2
yabai -m rule --add app='^Marked 2$' manage=off layer=above grid=1:2:1:0:1:1
yabai -m rule --add app='^Preview$' manage=off grid=1:2:1:0:1:1
# yabai -m rule --add app='^VNC Viewer$' manage=off
# yabai -m rule --add app='^iTerm2$' title='^Preferences$' manage=off layer=above
# yabai -m rule --add app='^qemu-system-' manage=off
# yabai -m rule --add title='Preferences$' manage=off
# yabai -m rule --add title='^QEMU$' manage=off layer=above
# Borders
# /opt/homebrew/bin/borders active_color=0xff84153D inactive_color=0xff494d64 width=5.0 2>/dev/null 1>&2 &
yabai -m config layout bsp # bsp, float
# vim: set ts=2 sw=2 tw=80 noet :