diff options
| author | Michael Hoang <Enzime@users.noreply.github.com> | 2024-10-24 10:50:04 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-24 10:50:04 +1100 |
| commit | 5f05c2c3d296c358dbdee8591528959d5360c247 (patch) | |
| tree | b125822662a1cb75aeead1b154042c3ed1a51f10 /tests | |
| parent | d99f9ae9fdfbcc36b81d264678bf58004464892e (diff) | |
| parent | 7ebf95a73e3b54e0f9c48f50fde29e96257417ac (diff) | |
Merge pull request #1106 from NickHu/aerospace
module: add aerospace service
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/services-aerospace.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/services-aerospace.nix b/tests/services-aerospace.nix new file mode 100644 index 0000000..8cbd292 --- /dev/null +++ b/tests/services-aerospace.nix @@ -0,0 +1,36 @@ +{ config, pkgs, ... }: + +let + aerospace = pkgs.runCommand "aerospace-0.0.0" { } "mkdir $out"; +in + +{ + services.aerospace.enable = true; + services.aerospace.package = aerospace; + services.aerospace.settings = { + 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"; + }; + }; + + test = '' + echo >&2 "checking aerospace service in ~/Library/LaunchAgents" + grep "org.nixos.aerospace" ${config.out}/user/Library/LaunchAgents/org.nixos.aerospace.plist + grep "${aerospace}/Applications/AeroSpace.app/Contents/MacOS/AeroSpace" ${config.out}/user/Library/LaunchAgents/org.nixos.aerospace.plist + + conf=`sed -En 's/^[[:space:]]*<string>.*--config-path (.*)<\/string>$/\1/p' \ + ${config.out}/user/Library/LaunchAgents/org.nixos.aerospace.plist` + + echo >&2 "checking config in $conf" + if [ `cat $conf | wc -l` -eq "27" ]; then echo "aerospace.toml config correctly contains 27 lines"; else return 1; fi + ''; +} |
