dotfiles/dot_config/yabai/executable_yabairc

88 lines
4 KiB
Text
Raw Normal View History

2023-08-28 21:09:38 +02:00
#!/usr/bin/env sh
# necessary to load scripting-addition during startup on macOS Big Sur
# *yabai --load-sa* is configured to run through sudo without a password
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
# mission-control desktop labels
yabai -m space 1 --label code
2023-08-30 09:25:24 +02:00
yabai -m space 2 --label web
yabai -m space 3 --label mail
yabai -m space 4 --label chat
yabai -m space 5 --label social
yabai -m space 6 --label notes
yabai -m space 7 --label media
2023-08-28 21:09:38 +02:00
yabai -m space 8 --label games
# window rules
yabai -m rule --add app="^Mail$" space=mail
yabai -m rule --add app="^Safari$" space=web
yabai -m rule --add app="^Notes$" space=notes
yabai -m rule --add app="^ida64$" space=re
yabai -m rule --add app="^Transmission$" space=media
yabai -m rule --add app="^Spotify$" space=media
yabai -m rule --add app="^Discord$" space=social grid=1:1:0:0:1:1 manage=off
yabai -m rule --add app="^Steam$" space=games manage=off
yabai -m rule --add app="^(Calculator|System Preferences|Archive Utility)$" manage=off
yabai -m rule --add app="^mpv$" manage=off border=off sticky=on layer=above opacity=1.0 grid=8:8:6:0:2:2
2023-08-29 00:02:17 +02:00
# float system preferences
yabai -m rule --add app="^System Preferences$" manage=off
yabai -m rule --add app="^choose$" manage=off
# show digital colour meter topmost and on all spaces
yabai -m rule --add app="^Digital Colou?r Meter$" sticky=on
# refresh my Übersicht bar when the space changes
yabai -m signal --add event=space_changed \
action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"spaces-widget\"'"
2023-08-28 21:09:38 +02:00
# signals
yabai -m signal --add event=window_destroyed active=yes action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse &> /dev/null || yabai -m window --focus \$(yabai -m query --windows --space | jq .[0].id) &> /dev/null"
yabai -m signal --add event=window_minimized active=yes action="if \$(yabai -m query --windows --window \$YABAI_WINDOW_ID | jq -r '.\"is-floating\"'); then yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse &> /dev/null || yabai -m window --focus \$(yabai -m query --windows --space | jq .[0].id) &> /dev/null; fi"
# specific space settings
yabai -m config --space mail layout stack
yabai -m config --space games layout float
# global settings
2023-08-28 22:11:45 +02:00
yabai -m config \
mouse_follows_focus off \
2023-08-28 22:13:21 +02:00
focus_follows_mouse autoraise \
2023-08-28 22:11:45 +02:00
window_origin_display default \
window_placement second_child \
window_zoom_persist on \
window_topmost off \
window_shadow on \
window_animation_duration 0.0 \
window_animation_frame_rate 120 \
window_opacity_duration 0.0 \
active_window_opacity 1.0 \
normal_window_opacity 0.90 \
window_opacity off \
insert_feedback_color 0xffd75f5f \
active_window_border_color 0xff775759 \
normal_window_border_color 0xff555555 \
window_border_width 4 \
window_border_radius 12 \
window_border_blur off \
window_border_hidpi on \
window_border off \
split_ratio 0.50 \
split_type auto \
auto_balance off \
top_padding 12 \
bottom_padding 12 \
left_padding 12 \
right_padding 12 \
window_gap 06 \
layout bsp \
mouse_modifier fn \
mouse_action1 move \
mouse_action2 resize \
mouse_drop_action swap
2023-08-28 21:09:38 +02:00
echo "yabai configuration loaded.."