{pkgs, ...}: { services.yabai = { enable = true; enableScriptingAddition = true; config = { layout = "bsp"; top_padding = 10; bottom_padding = 10; left_padding = 10; right_padding = 10; window_gap = 10; window_animation_duration = 0.05; # TODO: Change this to cmd once https://github.com/koekeishiya/yabai/issues/1551 is resolved mouse_modifier = "ctrl"; window_topmost = "off"; window_shadow = "float"; # focus_follows_mouse = "autoraise"; mouse_follows_focus = "on"; }; extraConfig = '' yabai -m rule --add app="^Alacritty$" border=on yabai -m signal --add event=window_created action='yabai -m query --windows --window $YABAI_WINDOW_ID | ${pkgs.jq}/bin/jq -er ".\"can-resize\" or .\"is-floating\"" || yabai -m window $YABAI_WINDOW_ID --toggle float' ''; }; }