diff --git a/hosts/little-lightning/configuration.nix b/hosts/little-lightning/configuration.nix index 9c0f278..d1852e4 100644 --- a/hosts/little-lightning/configuration.nix +++ b/hosts/little-lightning/configuration.nix @@ -1,4 +1,4 @@ -{ pkgs, self, ... }: { +{ pkgs, lib, self, ... }: { # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget environment.systemPackages = [ ]; @@ -14,6 +14,38 @@ # Enable alternative shell support in nix-darwin. # programs.fish.enable = true; + services.yabai = + let + gap = 10; + + gapListParts = builtins.map + (x: lib.attrsets.nameValuePair (x + "_padding") gap) + [ "top" "bottom" "left" "right" ]; + + gapSettings = (builtins.listToAttrs gapListParts) // { window_gap = gap; }; + in + { + enable = true; + enableScriptingAddition = true; + config = { + layout = "bsp"; + window_shadow = "float"; + + mouse_modifier = "fn"; + mouse_action1 = "move"; + mouse_action2 = "resize"; + focus_follows_mouse = "autoraise"; + mouse_follows_focus = "off"; + window_topmost = "off"; + } // gapSettings; + extraConfig = '' + yabai -m rule --add app="^System Settings$" manage=off + yabai -m rule --add app="Python" manage=off + yabai -m rule --add app="macroquad_playground" manage=off + yabai -m rule --add app="^coreautha$" manage=off + ''; + }; + users.users.zynh = { name = "zynh"; home = "/Users/zynh";