diff options
| author | cmacrae <hi@cmacr.ae> | 2020-05-06 17:21:46 +0100 |
|---|---|---|
| committer | cmacrae <hi@cmacr.ae> | 2020-05-10 22:35:54 +0100 |
| commit | 7ef533e8d1fb6ece563232b326fc5b5d5c2f9257 (patch) | |
| tree | a254f1b361e33d0fac5c1391f6f94b86b15488c2 /tests | |
| parent | f885aff4c9efca0dcb553fec9a5029f4995adb30 (diff) | |
module: add yabai service
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/services-yabai.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/services-yabai.nix b/tests/services-yabai.nix new file mode 100644 index 0000000..876ba38 --- /dev/null +++ b/tests/services-yabai.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + yabai = pkgs.runCommand "yabai-0.0.0" {} "mkdir $out"; +in + +{ + services.yabai.enable = true; + services.yabai.package = yabai; + services.yabai.config = { focus_follows_mouse = "autoraise"; }; + services.yabai.extraConfig = "yabai -m rule --add app='System Preferences' manage=off"; + + test = '' + echo >&2 "checking yabai service in ~/Library/LaunchAgents" + grep "org.nixos.yabai" ${config.out}/user/Library/LaunchAgents/org.nixos.yabai.plist + grep "${yabai}/bin/yabai" ${config.out}/user/Library/LaunchAgents/org.nixos.yabai.plist + + conf=`sed -En '/<string>-c<\/string>/{n; s/\s+?<\/?string>//g; p;}' \ + ${config.out}/user/Library/LaunchAgents/org.nixos.yabai.plist` + + echo >&2 "checking config in $conf" + grep "yabai -m config focus_follows_mouse autoraise" $conf + grep "yabai -m rule --add app='System Preferences' manage=off" $conf + ''; +} |
