diff options
Diffstat (limited to 'modules/by-name/lf')
-rw-r--r-- | modules/by-name/lf/lf/module.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/by-name/lf/lf/module.nix b/modules/by-name/lf/lf/module.nix index 7c31b711..44b7af0e 100644 --- a/modules/by-name/lf/lf/module.nix +++ b/modules/by-name/lf/lf/module.nix @@ -46,8 +46,8 @@ in { source = lib.getExe' pkgs.ctpv "ctpv"; }; settings = { - # close the server, after the last client exits - autoquit = true; + # Always keep the server running + autoquit = false; # disable the cusor in the preview pane cursorpreviewfmt = ""; @@ -76,10 +76,13 @@ in { set cleaner ${pkgs.ctpv}/bin/ctpvclear # Dynamically generate the cd mappings. + # This code dependends on the fact, that the lf server was started previously + # and keep running through `autoquit = false`. + # (Otherwise, the remote command is silently dropped: https://github.com/gokcehan/lf/issues/495) &{{ tmp="$(mktemp)" ${lib.getExe pkgs.lf-make-map} --depth 4 generate ~/media ~/repos ~/school >"$tmp" - lf -remote "send source $tmp" + lf -remote "send $id source $tmp" rm "$tmp" }} ''; |