1
0

macos: add yabai window manager

This commit is contained in:
2025-09-21 16:03:27 -07:00
parent 84ec7b5318
commit d93557d7bf
2 changed files with 34 additions and 0 deletions

View File

@@ -31,6 +31,7 @@
./system/macos/fonts.nix
./system/macos/nix.nix
./system/macos/system.nix
./system/macos/yabai.nix
];
};

33
system/macos/yabai.nix Normal file
View File

@@ -0,0 +1,33 @@
{ ... }:
{
# Enable the Yabai Window Manager
services.yabai = {
enable = true;
config = {
# default layout (can be bsp, stack or float)
layout = "bsp";
# New window spawns to the right if vertical split, or bottom if horizontal split
"window_placement" = "second_child";
# padding set to 4px
"top_padding" = "4";
"bottom_padding" = "4";
"left_padding" = "4";
"right_padding" = "4";
"window_gap" = "4";
# center mouse on window with focus
"focus_follows_mouse" = "autofocus";
"mouse_follows_focus" = "off";
# modifier for clicking and dragging with mouse
"mouse_modifier" = "cmd";
# set modifier + left-click drag to move window
"mouse_action1" = "move";
# set modifier + right-click drag to resize window
"mouse_action2" = "resize";
};
};
}