-
Notifications
You must be signed in to change notification settings - Fork 0
/
.yabairc
executable file
·87 lines (69 loc) · 2.92 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
#!/usr/bin/env bash
# Referred from https://github.com/julian-heng/yabai-config/blob/master/yabairc
set -x # Enable debugging
# == Variables ==
declare -A gaps
# declare -A color
declare -A opacity
gaps["top"]=4
gaps["bottom"]=8
gaps["left"]=4
gaps["right"]=4
gaps["inner"]=4
# color["active"]="0xE0808080"
# color["normal"]="0x00010101"
# color["preselect"]="0xE02d74da"
opacity["active"]=1.0
opacity["normal"]=0.8
# == Loading Scripting Additions ==
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa
# == Tiling Settings ==
# === Layout ===
yabai -m config layout bsp
# === Padding and Gaps ===
yabai -m config top_padding ${gaps["top"]}
yabai -m config bottom_padding ${gaps["bottom"]}
yabai -m config left_padding ${gaps["left"]}
yabai -m config right_padding ${gaps["right"]}
yabai -m config window_gap ${gaps["inner"]}
# === Split Ratios ===
yabai -m config auto_balance off # default
yabai -m config split_ratio 0.5 # default
# == Mouse Support ==
yabai -m config mouse_modifier fn # default
yabai -m config mouse_action1 move # default
yabai -m config mouse_action2 resize # default
yabai -m config mouse_follows_focus off
yabai -m config focus_follows_mouse off
# == Window Modifications ==
# yabai -m config window_topmost off # maybe deprecated
yabai -m config window_shadow float
yabai -m config window_opacity on
yabai -m config active_window_opacity ${opacity["active"]}
yabai -m config normal_window_opacity ${opacity["normal"]}
# maybe deprecated
# yabai -m config window_border on
# yabai -m config window_border_width 2
# yabai -m config active_window_border_color ${color["active"]}
# yabai -m config normal_window_border_color ${color["normal"]}
# yabai -m config insert_border_color ${color["preselect"]}
# == Rules ==
# === Off Management ===
yabai -m rule --add label="System Preferences" app="^System Preferences$" title=".*" manage=off
yabai -m rule --add label="App Store" app="^App Store$" manage=off
yabai -m rule --add label="Activity Monitor" app="^Activity Monitor$" manage=off
yabai -m rule --add label="Software Update" title="Software Update" manage=off
yabai -m rule --add label="About This Mac" app="System Information" title="About This Mac" manage=off
yabai -m rule --add label="Dictionary" app="^Dictionary$" manage=off
yabai -m rule --add label="Karabiner-EventViewer" app="^Karabiner-EventViewer$" manage=off
yabai -m rule --add label="Karabiner-Elements" app="^Karabiner-Elements$" manage=off
yabai -m rule --add label="Wechat" app="WeChat" title=".*" manage=off
yabai -m rule --add label="Finder" app="^Finder$" manage=off
yabai -m rule --add label="Bitwarden Application" app="^Bitwarden$" manage=off
yabai -m rule --add label="Chrome Extension" app="^Arc$" title="^chrome-extension://" manage=off
yabai -m rule --add label="Arc Preferences" app="^Arc$" title="why2002011…" manage=off
# === On Management ===
# == End ==
set +x # Disable debugging
echo "Yabai configuration loaded."