-
Notifications
You must be signed in to change notification settings - Fork 5
/
yabairc.symlink
executable file
·95 lines (80 loc) · 4.45 KB
/
yabairc.symlink
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
# the scripting-addition must be loaded manually if
# you are running yabai on macOS Big Sur. Uncomment
# the following line to have the injection performed
# when the config is executed during startup.
#
# for this to work you must configure sudo such that
# it will be able to run the command without password
#
# see this wiki page for information:
# - https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)
#
# Unload the macOS WindowManager process
launchctl unload -F /System/Library/LaunchAgents/com.apple.WindowManager.plist > /dev/null 2>&1 &
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
yabai -m signal --add event=window_focused action="sketchybar --trigger window_focus"
yabai -m signal --add event=display_added action="sleep 2 && $HOME/.dotfiles/yabai/create_spaces.sh"
yabai -m signal --add event=display_removed action="sleep 1 && $HOME/.dotfiles/yabai/create_spaces.sh"
yabai -m signal --add event=window_created action="sketchybar --trigger windows_on_spaces"
yabai -m signal --add event=window_destroyed action="sketchybar --trigger windows_on_spaces"
$HOME/.dotfiles/yabai/create_spaces.sh
# Move space 9 to the second display when it's connected
yabai -m space 6 --display 2
# Assign space 9 to the second display
yabai -m display --add 2 --space 6
# global settings
yabai -m config external_bar all:35:0 \
window_border on \
mouse_follows_focus off \
focus_follows_mouse off \
window_zoom_persist off \
window_placement second_child \
window_topmost off \
window_shadow float \
window_opacity off \
window_opacity_duration 0.0 \
active_window_opacity 1.0 \
normal_window_opacity 0.0 \
window_border_width 2 \
window_border_hidpi off \
window_border_radius 11 \
window_border_blur off \
window_animation_duration 0 \
active_window_border_color 0xffe1e3e4 \
normal_window_border_color 0xff494d64 \
insert_feedback_color 0xff9dd274 \
split_ratio 0.50 \
auto_balance off \
mouse_modifier fn \
mouse_action1 move \
mouse_action2 resize \
mouse_drop_action swap \
\
top_padding 1 \
bottom_padding 4 \
left_padding 4 \
right_padding 4 \
window_gap 6
echo "yabai configuration loaded.."
# Exclude problematic apps from being managed:
yabai -m rule --add app="^(Software Update|Dictionary|VLC|System Preferences|System Settings|zoom.us|Photo Booth|Archive Utility|App Store|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="About This Mac" app="System Information" title="About This Mac" manage=off
# Premiere need this in order to be managed properly
yabai -m rule --add app="^Adobe Premiere Pro 2024$" role="AXLayoutArea" subrole="AXFloatingWindow" manage=on
yabai -m rule --add app="^Adobe Premiere Pro 2024$" role="AXLayoutArea" subrole="AXDialog" manage=on
#yabai -m rule --add app="^Adobe Premiere Pro 2024$" manage=off
yabai -m config layout bsp
# move some apps automatically to specific spaces
yabai -m rule --add app="Brave Browser" space=^1
yabai -m rule --add app="Alacritty" space=2
yabai -m rule --add app="Code" space=3
yabai -m rule --add app="Notion" space=4
yabai -m rule --add app="Obsidian" space=4
yabai -m rule --add app="Slack" space=^5
yabai -m rule --add app="Discord" space=^5
yabai -m rule --add app="OBS Studio" space=^6
yabai -m rule --add app="Adobe Photoshop 2024" space=^6
yabai -m rule --add app="^Adobe Premiere Pro 2024$" space=^6