From df5ee622ce16070f59dd9195f89479bf0cfd92e0 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 25 Nov 2024 16:21:21 +0100 Subject: fix(modules/lf): Ensure, that the remote mapping source command works --- modules/by-name/lf/lf/module.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'modules/by-name/lf') 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" }} ''; -- cgit 1.4.1