diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-25 16:21:21 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-25 16:21:21 +0100 |
commit | df5ee622ce16070f59dd9195f89479bf0cfd92e0 (patch) | |
tree | 78734a7e7fdc4a1eb081d82bbf726faf9d44630a /modules/by-name | |
parent | fix(modules/lf/ctpv/): Support color output, by simulating a interactive shell (diff) | |
download | nixos-config-df5ee622ce16070f59dd9195f89479bf0cfd92e0.tar.gz nixos-config-df5ee622ce16070f59dd9195f89479bf0cfd92e0.zip |
fix(modules/lf): Ensure, that the remote mapping source command works
Diffstat (limited to 'modules/by-name')
-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" }} ''; |