mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
Separate yabai config and extra config by newline
If a user passes both `config` and `extraConfig` to the `yabai` serivce, the generated `yabairc` file is invalid. This is because we do not add a newline separator when we concatenate the config string generated by `toYabaiConfig cfg.config` with `cfg.extraConfig`. This PR prepends a newline to `cfg.extraConfig` if it is non-empty so that the resulting `yabairc` config is valid.
This commit is contained in:
parent
5f6d300a2d
commit
97729d1e79
2 changed files with 2 additions and 1 deletions
|
@ -14,7 +14,7 @@ let
|
|||
(if (cfg.config != {})
|
||||
then "${toYabaiConfig cfg.config}"
|
||||
else "")
|
||||
+ optionalString (cfg.extraConfig != "") cfg.extraConfig)}";
|
||||
+ optionalString (cfg.extraConfig != "") ("\n" + cfg.extraConfig + "\n"))}";
|
||||
in
|
||||
|
||||
{
|
||||
|
|
|
@ -23,5 +23,6 @@ in
|
|||
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
|
||||
if [ `cat $conf | wc -l` -eq "2" ]; then echo "yabairc correctly contains 2 lines"; else return 1; fi
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue