-
Notifications
You must be signed in to change notification settings - Fork 0
/
yabairc
executable file
·102 lines (88 loc) · 4.84 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
#!/usr/bin/env bash
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
# bar settings
yabai -m config status_bar off
yabai -m config status_bar_text_font "Helvetica Neue:Bold:12.0"
yabai -m config status_bar_icon_font "Font Awesome 5 Free:Solid:12.0"
yabai -m config status_bar_background_color 0xff202020
yabai -m config status_bar_foreground_color 0xffa8a8a8
yabai -m config status_bar_space_icon_strip I II III IV V VI VII VIII IX X
yabai -m config status_bar_power_icon_strip
yabai -m config status_bar_space_icon
yabai -m config status_bar_clock_icon
# 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 window_border off
yabai -m config window_border_placement inset
yabai -m config window_border_width 2
yabai -m config window_border_radius -1.0
yabai -m config active_window_border_topmost off
yabai -m config active_window_border_color 0xff775759
yabai -m config normal_window_border_color 0xff505050
yabai -m config insert_window_border_color 0xffd75f5f
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
yabai -m config mouse_modifier ctrl # was alt before, but this breaks copying from vim at the moment
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 0
yabai -m config bottom_padding 0
yabai -m config left_padding 5
yabai -m config right_padding 5
yabai -m config window_gap 5
# window rules
yabai -m rule --add app="^System Preferences$" manage=off
yabai -m rule --add app="^Preferences$" manage=off
yabai -m rule --add app="^Bitwarden$" manage=off
yabai -m rule --add app="^Finder$" manage=off
yabai -m rule --add app="^Code42 CrashPlan$" manage=off
yabai -m rule --add app='IntelliJ IDEA' title='.*Welcome*.|Checkout*.|.*Configurations|Choose*.|Import*.|.*Charges|Tip*.|Rename*.|Preferences|Data Sources and Drivers|Project Structure|Inspect|Move.*|Extract.*|Export.*|Create.*|Delete.*|Update.*|Conflics.*|Merge.*|Confirm.*|Conflicts.*|Modify.*|Deployment.*|Options.*|Copy.*' manage=off
yabai -m rule --add app="^Steam$" manage=off
yabai -m rule --add app="^Flux$" manage=off
yabai -m rule --add app="^Lunar$" manage=off
yabai -m rule --add app="^Firefox$" title='Opening.*' manage=off
if [[ "$(hostname)" == *"linkedin.biz"* ]]; then
echo "loading work laptop specific..."
yabai -m rule --add app="Outlook" display=1 space=2
yabai -m rule --add app="^Slack$" display=1 space=2
yabai -m rule --add app="Rambox" display=2 space=12
yabai -m rule --add app="Messages" display=2 space=12
yabai -m rule --add app="Todoist" display=2 space=13
yabai -m rule --add app="Spotify" display=3
yabai -m rule --add app="iTerm2" title="tower.*hotkey" manage=off
yabai -m rule --add title="Android Emulator.*" manage=off
else
echo "loading personal laptop specifics..."
yabai -m rule --add app="Firefox" space=1
yabai -m rule --add app="Canary Mail" space=2
yabai -m rule --add app="Messages" space=3
yabai -m rule --add app="Discord" space=3
yabai -m rule --add app="Todoist" space=4
yabai -m rule --add app="iTerm2" title=".*hotkey" manage=off
yabai -m rule --add app="iTerm2" manage=off
fi
# make inactive windows transparent
yabai -m config window_opacity on
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.8
# signals
yabai -m signal --add event=window_destroyed action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse"
yabai -m signal --add event=application_terminated action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse"
# update bitbar plugin with current space
yabai -m signal --add event=space_changed action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_added action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_removed action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_changed action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
yabai -m signal --add event=display_moved action="open -gj 'bitbar://refreshPlugin?name=yabai.1d.sh'"
echo "yabai configuration loaded.."