mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
aerospace: add test
This commit is contained in:
41
tests/modules/programs/aerospace/aerospace-colemak.nix
Normal file
41
tests/modules/programs/aerospace/aerospace-colemak.nix
Normal 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}
|
||||
'';
|
||||
}
|
||||
@@ -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"
|
||||
@@ -2,4 +2,5 @@
|
||||
|
||||
lib.optionalAttrs pkgs.stdenv.hostPlatform.isDarwin {
|
||||
aerospace = ./aerospace.nix;
|
||||
aerospace-colemak = ./aerospace-colemak.nix;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user