Files
nixos-config/modules/nixos/macos-tiling/tiling.nix
2025-12-02 10:12:05 +01:00

42 lines
944 B
Nix

{pkgs, ...}: {
environment.systemPackages = with pkgs; [
yabai
skhd
];
environment.variables.EDITOR = "code";
# skhd service and config
services.skhd = {
enable = true;
skhdConfig = ''
# toggle window split type
alt - e : yabai -m window --toggle split
# rotate tree
alt - r : yabai -m space --rotate 90
'';
};
# yabai service and config
services.yabai = {
enable = true;
package = pkgs.yabai;
enableScriptingAddition = true;
config = {
focus_follows_mouse = "autoraise";
window_placement = "second_child";
window_shadow = "on";
window_opacity = "off";
};
extraConfig = ''
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
yabai -m space 1 --label i
yabai -m space 2 --label ii
yabai -m space 3 --label iii
yabai -m space 4 --label iv
'';
};
}