-
Notifications
You must be signed in to change notification settings - Fork 3
/
.yabairc
executable file
·103 lines (84 loc) · 4.69 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
#!/usr/bin/env sh
export SHELL="$(which sh)";
# float system preferences. Most of these just diable Yabai form resizing them.
yabai -m rule --add app="^CopyQ$" sticky=on layer=above manage=on
yabai -m rule --add app="^System Preferences$" sticky=on layer=above manage=off
yabai -m rule --add app="^Karabiner-Elements$" sticky=on layer=above manage=off
yabai -m rule --add app="^Karabiner-EventViewer$" sticky=on layer=above manage=off
yabai -m rule --add app="^Finder$" sticky=on layer=above manage=off
yabai -m rule --add app="^Disk Utility$" sticky=on layer=above manage=off
yabai -m rule --add app="^System Information$" sticky=on layer=above manage=off
yabai -m rule --add app="^Activity Monitor$" sticky=on layer=above manage=off
yabai -m rule --add app="^Path Finder$" manage=off
yabai -m rule --add app="^Adobe" manage=on
yabai -m rule --add app="^neovide" manage=on
#find ~/Library/Parallels/Applications\ Menus/ -maxdepth 3 -type f | awk -F'/' '{ print $NF; }' | awk '{$1=$1};1' | sort | uniq | tr "\n" "\0" | xargs -0 -I{} yabai -m rule --add app="^{}\$" title=".*" manage=on
## Some random global settings
#yabai -m config focus_follows_mouse autoraise
#yabai -m config focus_follows_mouse on
# New window spawns to the right if vertical split, or bottom if horizontal split
#-yabai -m config window_placement second_child
#-yabai -m config window_topmost off
#yabai -m config window_shadow float
#-yabai -m config window_opacity off
#yabai -m config window_opacity_duration 0.00
#-yabai -m config active_window_opacity 1.0
#yabai -m config normal_window_opacity 0.97
#yabai -m config window_border on | off
## WITH SIP ENABLED (Installed Limelight seperately, Don't need this)
#yabai -m config window_border off
## WTIH SIP DISABLED (Limelight build into Yabai, enable it here)
# I'm no longer using it, spacebar helps to identify the active window.
# yabai -m config window_border on
# yabai -m config window_border_width 1
# yabai -m config active_window_border_color 0xFF40FF00
# yabai -m config normal_window_border_color 0x00FFFFFF
# yabai -m config insert_feedback_color 0xffd75f5f
## some other settings
yabai -m config auto_balance on
yabai -m config split_ratio 0.50
# # set mouse interaction modifier key (default: fn)
#-yabai -m config mouse_modifier ctrl
# set modifier + right-click drag to resize window (default: resize)
yabai -m config mouse_action2 resize
# set modifier + left-click drag to resize window (default: move)
yabai -m config mouse_action1 move
# general space settings
#yabai -m config focused_border_skip_floating 1
#yabai -m config --space 3 layout float
## Change how yabai looks
yabai -m config layout stack
for padding in top_padding bottom_padding left_padding right_padding window_gap; do {
yabai -m config "$padding" 5;
} done
#Limelight addon (Kill it and start it each time Yabai starts)
#killall limelight &>/dev/null
#limelight &>/dev/null &
# #Ubersicht widget bar stuff
#yabai -m signal --add event=space_changed \
#action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'"
#yabai -m signal --add event=display_changed \
#action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'"
#yabai -m signal --add event=space_changed \
#action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-secondary-jsx\"'"
#yabai -m signal --add event=display_changed \
#action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-secondary-jsx\"'"
# 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=space_changed action="yabai -m window --focus $(yabai -m query --windows --window | jq ".id")"
# yabai -m signal --add event=application_terminated action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse"
#testing signals
# yabai -m signal --add event=window_destroyed action="terminal-notifier -message 'window_destroyed'"
# yabai -m signal --add event=application_terminated action="terminal-notifier -message 'application_terminated'"
## If I close the active window, focus on any other visible window.
##yabai -m signal --add event=window_destroyed action="bash /Users/jesseskelton/CustomScripts/SwitchSpaces/window-focus-on-destroy.sh"
# yabai -m signal --add event=space_changed action="export CUR_ACTIVE_APP=\"iTerm2\""
echo "yabai configuration loaded.."
# Start skhd
killall skhd >/dev/null 2>&1
skhd > /tmp/skhd.log 2>&1 &
# Start sketchybar
yabai -m config external_bar all:26:0
killall sketchybar >/dev/null 2>&1
sketchybar > /tmp/sketchybar.log 2>&1 &
#END