1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-31 04:04:45 +00:00

yabai: load scripting additions on start and dock restart

This commit is contained in:
Veselin Ivanov 2024-12-15 15:34:31 +02:00
parent a35b08d09e
commit 12c2329dbd
No known key found for this signature in database

View file

@ -10,11 +10,15 @@ let
(p: v: "yabai -m config ${p} ${toString v}")
opts);
scriptingAdditionConfig = ''
yabai -m signal --add event=dock_did_restart action='sudo yabai --load-sa'
sudo yabai --load-sa
'';
configFile = mkIf (cfg.config != { } || cfg.extraConfig != "")
"${pkgs.writeScript "yabairc" (
(if (cfg.config != {})
then "${toYabaiConfig cfg.config}"
else "")
optionalString (cfg.enableScriptingAddition) (scriptingAdditionConfig + "\n")
+ optionalString (cfg.config != {}) (toYabaiConfig cfg.config)
+ optionalString (cfg.extraConfig != "") ("\n" + cfg.extraConfig + "\n"))}";
in