From f583fe82d7fcf90db4352b6c9b27583594d3e567 Mon Sep 17 00:00:00 2001 From: Dennis Date: Sat, 7 Mar 2026 17:25:24 +0100 Subject: [PATCH] uses tiling instead of scrolling --- modules/cli-tools/default.nix | 4 +- modules/hosts/dnsc-air/default.nix | 2 +- modules/tiling-desktop/default.nix | 114 +++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 modules/tiling-desktop/default.nix diff --git a/modules/cli-tools/default.nix b/modules/cli-tools/default.nix index f015699..4147599 100644 --- a/modules/cli-tools/default.nix +++ b/modules/cli-tools/default.nix @@ -29,7 +29,7 @@ in environment.systemPackages = commonPackages pkgs; home-manager.sharedModules = [ - inputs.self.modules.homeManager.git + inputs.self.modules.homeManager.cli-tools ]; }; @@ -39,7 +39,7 @@ in environment.systemPackages = commonPackages pkgs; home-manager.sharedModules = [ - inputs.self.modules.homeManager.git + inputs.self.modules.homeManager.cli-tools ]; }; diff --git a/modules/hosts/dnsc-air/default.nix b/modules/hosts/dnsc-air/default.nix index ff1226f..7d936e3 100644 --- a/modules/hosts/dnsc-air/default.nix +++ b/modules/hosts/dnsc-air/default.nix @@ -18,7 +18,7 @@ in neovim terminal browser - scrolling-desktop + tiling-desktop ( { ... }: diff --git a/modules/tiling-desktop/default.nix b/modules/tiling-desktop/default.nix new file mode 100644 index 0000000..6476d67 --- /dev/null +++ b/modules/tiling-desktop/default.nix @@ -0,0 +1,114 @@ +{ inputs, ... }: +{ + flake.modules.darwin.tiling-desktop = + { pkgs, ... }: + { + services.aerospace = { + enable = true; + settings = { + accordion-padding = 10; + gaps = { + inner.horizontal = 6; + inner.vertical = 6; + outer.left = 6; + outer.bottom = 6; + outer.top = 6; + outer.right = 6; + }; + workspace-to-monitor-force-assignment = { + "1" = "main"; + "2" = "main"; + "3" = "main"; + "4" = "main"; + "5" = "secondary"; + "6" = "secondary"; + }; + mode.main.binding = { + alt-h = "focus left"; + alt-j = "focus down"; + alt-k = "focus up"; + alt-l = "focus right"; + alt-shift-h = "move left"; + alt-shift-j = "move down"; + alt-shift-k = "move up"; + alt-shift-l = "move right"; + alt-comma = "layout tiles horizontal vertical"; + alt-period = "layout accordion horizontal vertical"; + alt-f = "fullscreen"; + alt-1 = "workspace 1"; + alt-2 = "workspace 2"; + alt-3 = "workspace 3"; + alt-4 = "workspace 4"; + alt-5 = "workspace 5"; + alt-6 = "workspace 6"; + alt-shift-1 = [ + "move-node-to-workspace 1" + "workspace 1" + ]; + alt-shift-2 = [ + "move-node-to-workspace 2" + "workspace 2" + ]; + alt-shift-3 = [ + "move-node-to-workspace 3" + "workspace 3" + ]; + alt-shift-4 = [ + "move-node-to-workspace 4" + "workspace 4" + ]; + alt-shift-5 = [ + "move-node-to-workspace 5" + "workspace 5" + ]; + alt-shift-6 = [ + "move-node-to-workspace 6" + "workspace 6" + ]; + }; + on-window-detected = [ + { + "if".app-id = "app.zen-browser.zen"; + run = "move-node-to-workspace 1"; + } + { + "if".app-id = "net.imput.helium"; + run = "move-node-to-workspace 1"; + } + { + "if".app-id = "com.mitchellh.ghostty"; + run = "move-node-to-workspace 2"; + } + { + "if".app-id = "com.apple.Preview"; + run = "move-node-to-workspace 3"; + } + { + "if".app-id = "com.apple.dt.Xcode"; + run = "move-node-to-workspace 3"; + } + { + "if".app-id = "com.postmanlabs.mac"; + run = "move-node-to-workspace 3"; + } + { + "if".app-id = "com.apple.iCal"; + run = "move-node-to-workspace 4"; + } + { + "if".app-id = "com.microsoft.teams2"; + run = "move-node-to-workspace 5"; + } + { + "if".app-id = "com.spotify.client"; + run = "move-node-to-workspace 6"; + } + { + "if".app-id = "com.apple.reminders"; + run = "move-node-to-workspace 6"; + } + ]; + }; + }; + }; +}