dotfiles/NixOS/home/lf/default.nix

40 lines
880 B
Nix
Raw Normal View History

2024-06-02 13:05:51 +02:00
{ config, pkgs, ... }:
{
2024-06-02 14:02:14 +02:00
home.file."${config.xdg.configHome}/lf" = {
source = ./files;
recursive = true;
};
programs.lf = {
enable = true;
settings = {
icons = true;
autoquit = true;
mouse = true;
number = true;
relativenumber = true;
cursorpreviewfmt = "";
2024-06-02 13:14:46 +02:00
};
2024-06-02 14:02:14 +02:00
keybindings = {
"<backspace2>" = "quit";
"<c-e>" = "half-up";
"." = "set hidden!";
"o" = "$nvim -c \"lua require(\\\"oil\\\").open(\\\"$PWD\\\")\"";
"-" = "$nvim -c \"lua require(\\\"oil\\\").open(\\\"$PWD\\\")\"";
"<enter>" = "open";
"<c-t>" = ":jump <enter>";
2024-06-02 13:05:51 +02:00
};
2024-06-02 14:02:14 +02:00
commands = {
jump = ''
''${{
res=$(zsh -c "source $HOME/.zshrc && find_global d")
lf -remote "send $id cd \"$res\""
}}
'';
};
cmdKeybindings = {
q = "quit";
};
};
2024-06-02 13:05:51 +02:00
}