-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathyabairc
executable file
·97 lines (79 loc) · 3.48 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
#!/usr/bin/env sh
# necessary to load scripting-addition during startup on macOS Big Sur
# *yabai --load-sa* is configured to run through sudo without a password
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
# ====
# Initialization
# ====
source ~/.config/yabai/scripts/initialization.sh
refresh_swiftbar_yabai_plugin="open -g 'swiftbar://refreshplugin?name=yabai'"
# ====
# Rules
# ====
# Unmanaged applications
yabai -m rule --add app=".* Preferences" manage=off
yabai -m rule --add app="System Information" manage=off
yabai -m rule --add app="EuDic" manage=off
yabai -m rule --add app="Activity Monitor" manage=off
yabai -m rule --add app="App Store" manage=off
yabai -m rule --add app="1Password .*" manage=off
yabai -m rule --add app="Bartender" manage=off
yabai -m rule --add app="iStat Menu" manage=off
yabai -m rule --add app="Karabiner" manage=off
yabai -m rule --add title="Preferences" manage=off
yabai -m rule --add app="Installer" manage=off
yabai -m rule --add app="Fantastical Helper" manage=off # Fantastical menu bar drop-down menu
# Border on
yabai -m rule --add app="kitty|Alacritty" border=on
yabai -m rule --add app="iTerm2" title!="Preferences|Profiles|Updating|^$" border=on
# ====
# Signals
# ====
# Initialize the temp folder when adding or removing displays
yabai -m signal --add event=display_added action="~/.config/yabai/scripts/initialization.sh"
yabai -m signal --add event=display_removed action="~/.config/yabai/scripts/initialization.sh"
# Refresh yabai SwiftBar plugin
yabai -m signal --add event=space_changed action="${refresh_swiftbar_yabai_plugin}"
yabai -m signal --add event=display_added action="${refresh_swiftbar_yabai_plugin}"
yabai -m signal --add event=display_removed action="${refresh_swiftbar_yabai_plugin}"
yabai -m signal --add event=display_changed action="${refresh_swiftbar_yabai_plugin}"
yabai -m signal --add event=display_moved action="${refresh_swiftbar_yabai_plugin}"
yabai -m signal --add event=display_moved action="${refresh_swiftbar_yabai_plugin}"
# ====
# Configs
# ====
# General
yabai -m config layout bsp
yabai -m config split_ratio 0.50
yabai -m config auto_balance off
yabai -m config insert_feedback_color 0xaad75f5f
# Window
yabai -m config window_placement second_child
yabai -m config window_topmost off
yabai -m config window_shadow off
yabai -m config window_opacity off
yabai -m config window_opacity_duration 0.0
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.90
# Window border
yabai -m config window_border off
yabai -m config window_border_width 3
yabai -m config active_window_border_color 0xffffbb7d
yabai -m config normal_window_border_color 0xff353c54
# Mouse
yabai -m config mouse_follows_focus off
yabai -m config focus_follows_mouse off
yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
# Paddings
yabai -m config top_padding 5
yabai -m config bottom_padding 5
yabai -m config left_padding 5
yabai -m config right_padding 5
yabai -m config window_gap 5
# yabai -m config external_bar all:28:0
# Refresh yabai SwfitBar plugin after reboot
open -g 'swiftbar://refreshplugin?name=yabai'
echo "yabai configuration loaded.."