blob: 9ce31d40381d379e5e3401c13fac898ba604adb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{
pkgs,
lib,
config,
...
}:
# lf - terminal file manager
{
options.tools.lf = {
enable = lib.mkEnableOption "Enables lf.";
};
config = lib.mkIf config.tools.lf.enable {
home.packages = with pkgs; [
ctpv
];
programs.lf = {
enable = true;
settings = {
number = true;
icons = true;
drawbox = true;
hidden = true;
preview = true;
shell = if config.tools.zsh.enable then lib.getExe pkgs.zsh else "bash";
shellopts = "'-eu'";
ifs = "\n";
scrolloff = "4";
period = "1";
incsearch = true;
smartcase = true;
info = "size";
sortby = "natural";
dirfirst = true;
cleaner = lib.getExe config.scripts.file-preview-clean.package;
};
previewer = {
source = lib.getExe config.scripts.file-preview.package;
};
extraConfig = ''
${builtins.readFile ./lfrc}
'';
};
home.file.".config/lf/icons".source = ./icons;
};
}
|