moby: cleanup bonsai <-> sway circular dependency (slightly)

This commit is contained in:
Colin 2024-05-30 12:40:54 +00:00
parent 3fdeacc336
commit d3937487e6
3 changed files with 5 additions and 2 deletions

View File

@ -124,7 +124,10 @@ in
partOf = [ "graphical-session" ];
# nice -n -11 chosen arbitrarily. i hope this will allow for faster response to inputs, but without audio underruns (pipewire is -21, dino -15-ish)
command = pkgs.writeShellScript "bonsai-start" ''
mkdir -p $XDG_RUNTIME_DIR/bonsai
# TODO: don't create the sway directory here!
# i do it for now because sway and bonsai call into eachother; circular dependency:
# - sway -> bonsai -> sane-input-handler -> swaymsg
mkdir -p $XDG_RUNTIME_DIR/{bonsai,sway}
exec nice -n -11 bonsaid -t $HOME/.config/bonsai/bonsai_tree.json
'';
cleanupCommand = "rm -f $XDG_RUNTIME_DIR/bonsai/bonsai";

View File

@ -155,6 +155,7 @@ in
voldown_pressed.timeout = recurseHold "voldown" {};
});
sane.programs.sway.sandbox.extraRuntimePaths = lib.mkIf cfg.enabled [ "bonsai" ];
sane.programs.sway.config.extra_lines = lib.mkIf cfg.enabled (
''
# bindsym --input-device=... :

View File

@ -191,7 +191,6 @@ in
sandbox.whitelistX = true; # sway invokes xwayland itself
sandbox.whitelistWayland = true;
sandbox.extraRuntimePaths = [
"bonsai"
"sway"
];
sandbox.extraPaths = [