86 lines
3.1 KiB
Bash
Executable File
86 lines
3.1 KiB
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
# startup - load scripting addition
|
|
sudo yabai --load-sa
|
|
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
|
|
|
|
# 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_shadow float
|
|
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
|
|
|
|
# Spacebar Integration
|
|
#SPACEBAR_HEIGHT=$(spacebar -m config height)
|
|
#yabai -m config external_bar all:$SPACEBAR_HEIGHT:0
|
|
|
|
# stacking support
|
|
# yabai -m window --focus $(yabai -m query --windows --space | jq -r 'map(select(."stack-index" == 2)) | .[0].id')
|
|
|
|
# base examples
|
|
# # stack target_window_sel onto source_window_sel
|
|
# yabai -m window [<source_window_sel>] --stack <target_window_sel>
|
|
#
|
|
# # next window is inserted onto source_window_sel
|
|
# yabai -m window [<source_window_sel>] --insert stack
|
|
#
|
|
# # focus the prev window in a stack
|
|
# yabai -m window --focus stack.prev
|
|
#
|
|
# # focus the next window in a stack
|
|
# yabai -m window --focus stack.next
|
|
#
|
|
# # focus the first window in a stack
|
|
# yabai -m window --focus stack.first
|
|
#
|
|
# # focus the last window in a stack
|
|
# yabai -m window --focus stack.last
|
|
#
|
|
# # focus the most recently focused window in a stack
|
|
# yabai -m window --focus stack.recent
|
|
|
|
|
|
# for swapping from stack or space regardless
|
|
# forward
|
|
# yabai -m query --spaces --space \
|
|
# | jq -re ".index" \
|
|
# | xargs -I{} yabai -m query --windows --space {} \
|
|
# | jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.x, .id) | reverse | nth(index(map(select(.focused == 1))) - 1).id" \
|
|
# | xargs -I{} yabai -m window --focus {}
|
|
#
|
|
# # backward
|
|
# yabai -m query --spaces --space \
|
|
# | jq -re ".index" \
|
|
# | xargs -I{} yabai -m query --windows --space {} \
|
|
# | jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.y, .id) | nth(index(map(select(.focused == 1))) - 1).id" \
|
|
# | xargs -I{} yabai -m window --focus {}
|
|
|
|
# finished
|
|
echo "yabai configuration loaded.."
|
|
|
|
|