blob: 4a15063963c90b004daf9c44243520d49c2f8d4a (
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
|
{
pkgs,
config,
lib,
...
}: let
cfg = config.collinux.terminal.shells.fish;
toml' = pkgs.formats.toml {};
conf = toml'.generate "conf.toml" {
verbs = [
{
name = "open-code";
key = "enter";
execution = "$EDITOR +{line} {file}";
working_dir = "{root}";
leave_broot = true;
}
];
};
in
lib.mkIf cfg.enable {
hjem.users."${config.collinux.user.name}" = {
files = {
".config/broot/conf.toml".source = conf;
".config/fish/conf.d/broot.fish".text = lib.mkIf config.collinux.terminal.shells.fish.enable ''
if status is-interactive
${pkgs.broot}/bin/broot --print-shell-function fish | source
end
'';
};
packages = [pkgs.broot];
};
}
|