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:
parent
a35b08d09e
commit
12c2329dbd
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue