forked from yutatsuoe/yabai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyabairc
executable file
·121 lines (107 loc) · 3.02 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
#!/usr/bin/env sh
# global settings
yabai -m config mouse_follows_focus off
yabai -m config focus_follows_mouse off
yabai -m config window_origin_display default
yabai -m config window_placement second_child
yabai -m config window_topmost on
yabai -m config window_shadow on
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
yabai -m config window_border off
yabai -m config window_border_width 6
yabai -m config active_window_border_color 0xff775759
yabai -m config normal_window_border_color 0xff555555
yabai -m config insert_feedback_color 0xffd75f5f
yabai -m config split_ratio 0.50
yabai -m config auto_balance off
yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
yabai -m config mouse_drop_action swap
# general space settings
yabai -m config layout bsp
yabai -m config top_padding 12
yabai -m config bottom_padding 12
yabai -m config left_padding 12
yabai -m config right_padding 12
yabai -m config window_gap 06
# BAR HEIGHT
BAR_HEIGHT=$(sketchybar -m --query bar | jq -r '.height')
# SETUP SPACES
create_spaces 7
GENERAL=(
external_bar all:"${BAR_HEIGHT}":0
split_type auto
split_ratio 0.5
auto_balance off
insert_feedback_color 0xff7793d1
)
# external_bar all:39:0 \
WINDOWS=(
window_placement second_child
window_topmost on
window_shadow float
window_opacity on
active_window_opacity 1.0
normal_window_opacity 0.9
window_animation_duration 0.0
window_origin_display focused
window_opacity_duration 0.15
)
# window_topmost off \
# normal_window_opacity 0.95 \
# window_animation_duration 0.15
BORDERS=(
window_border on
window_border_blur off
window_border_hidpi on
window_border_width 2
window_border_radius 12
active_window_border_color 0xff7793d1
normal_window_border_color 0xff5e6798
)
# window_border_radius 11 \
LAYOUT=(
layout bsp
top_padding 20
bottom_padding 10
left_padding 10
right_padding 10
window_gap 10
)
MOUSE=(
mouse_modifier super
mouse_action1 move
mouse_action2 resize
mouse_drop_action swap
focus_follows_mouse autoraise
mouse_follows_focus off
)
yabai -m config "${GENERAL[@]}"
yabai -m config "${WINDOWS[@]}"
yabai -m config "${BORDERS[@]}"
yabai -m config "${LAYOUT[@]}"
yabai -m config "${MOUSE[@]}"
# SPACE LABELS
LABELS=(
main
comms
code
ref
productivity
media
vm
misc
scratch
)
for ((i = 1; i <= "${#LABELS[@]}"; i++)); do
yabai -m space "${i}" --label "${LABELS[(($i - 1))]}"
done
# SPACE LAYOUTS
yabai -m config --space comms layout stack window_opacity off
yabai -m config --space media layout stack window_opacity off
yabai -m config --space scratch layout float
echo "yabai configuration loaded.."