2021-08-31 18:52:20 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.broot = {
|
|
|
|
enable = true;
|
2022-09-26 20:36:06 +02:00
|
|
|
settings.modal = true;
|
2021-08-31 18:52:20 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileExists home-files/.config/broot/conf.toml
|
|
|
|
assertFileContent home-files/.config/broot/conf.toml ${
|
|
|
|
pkgs.writeText "broot.expected" ''
|
|
|
|
modal = true
|
2022-09-26 20:36:06 +02:00
|
|
|
show_selection_mark = true
|
2021-08-31 18:52:20 +02:00
|
|
|
|
|
|
|
[[verbs]]
|
2022-09-26 20:36:06 +02:00
|
|
|
execution = "$EDITOR +{line} {file}"
|
2021-08-31 18:52:20 +02:00
|
|
|
invocation = "edit"
|
2022-09-26 20:36:06 +02:00
|
|
|
leave_broot = false
|
2021-08-31 18:52:20 +02:00
|
|
|
shortcut = "e"
|
|
|
|
|
|
|
|
[[verbs]]
|
|
|
|
execution = "$EDITOR {directory}/{subpath}"
|
|
|
|
invocation = "create {subpath}"
|
2022-09-26 20:36:06 +02:00
|
|
|
leave_broot = false
|
|
|
|
|
|
|
|
[[verbs]]
|
|
|
|
execution = "git difftool -y {file}"
|
|
|
|
invocation = "git_diff"
|
|
|
|
leave_broot = false
|
|
|
|
shortcut = "gd"
|
|
|
|
|
|
|
|
[[verbs]]
|
|
|
|
auto_exec = false
|
|
|
|
execution = "cp -r {file} {parent}/{file-stem}-{version}{file-dot-extension}"
|
|
|
|
invocation = "backup {version}"
|
|
|
|
key = "ctrl-b"
|
|
|
|
leave_broot = false
|
2021-08-31 18:52:20 +02:00
|
|
|
|
|
|
|
[[verbs]]
|
2022-09-26 20:36:06 +02:00
|
|
|
execution = "$SHELL"
|
|
|
|
invocation = "terminal"
|
|
|
|
key = "ctrl-t"
|
|
|
|
leave_broot = false
|
|
|
|
set_working_dir = true
|
2021-08-31 18:52:20 +02:00
|
|
|
|
|
|
|
[skin]
|
|
|
|
''
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|