aerospace: add test

This commit is contained in:
BeLeap 2025-08-16 14:29:18 +09:00 committed by Austin Horstman
parent bbfbda4ad8
commit e293a1a12f
3 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,41 @@
{ config, pkgs, ... }:
let
hmPkgs = pkgs.extend (
self: super: {
aerospace = config.lib.test.mkStubPackage {
name = "aerospace";
buildScript = ''
mkdir -p $out/bin
touch $out/bin/aerospace
chmod 755 $out/bin/aerospace
'';
};
}
);
in
{
programs.aerospace = {
enable = true;
package = hmPkgs.aerospace;
userSettings = {
gaps = {
outer.left = 8;
outer.bottom = 8;
outer.top = 8;
outer.right = 8;
};
mode.main.binding = {
alt-h = "focus left";
alt-j = "focus down";
alt-k = "focus up";
alt-l = "focus right";
};
key-mapping.preset = "colemak";
};
};
nmt.script = ''
assertFileContent home-files/.config/aerospace/aerospace.toml ${./colemak-settings-expected.toml}
'';
}

View file

@ -0,0 +1,25 @@
accordion-padding = 30
after-startup-command = []
default-root-container-layout = "tiles"
default-root-container-orientation = "auto"
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true
exec-on-workspace-change = []
on-focus-changed = []
on-focused-monitor-changed = ["move-mouse monitor-lazy-center"]
on-window-detected = []
[gaps.outer]
bottom = 8
left = 8
right = 8
top = 8
[key-mapping]
preset = "colemak"
[mode.main.binding]
alt-h = "focus left"
alt-j = "focus down"
alt-k = "focus up"
alt-l = "focus right"

View file

@ -2,4 +2,5 @@
lib.optionalAttrs pkgs.stdenv.hostPlatform.isDarwin {
aerospace = ./aerospace.nix;
aerospace-colemak = ./aerospace-colemak.nix;
}