mirror of
https://github.com/nix-community/home-manager
synced 2024-12-18 17:14:52 +00:00
65b65ce5ef
* broot: use freeformType for config * broot: use defaults from upstream closes #2395 * broot: generate shell function * broot: add @dermetfan to CODEOWNERS * broot: rename `config` option to `settings` * broot: make example more idiomatic Co-authored-by: Nicolas Berbiche <nic.berbiche@gmail.com> Co-authored-by: Nicolas Berbiche <nic.berbiche@gmail.com>
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
programs.broot = {
|
|
enable = true;
|
|
settings.modal = true;
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/broot/conf.toml
|
|
assertFileContent home-files/.config/broot/conf.toml ${
|
|
pkgs.writeText "broot.expected" ''
|
|
modal = true
|
|
show_selection_mark = true
|
|
|
|
[[verbs]]
|
|
execution = "$EDITOR +{line} {file}"
|
|
invocation = "edit"
|
|
leave_broot = false
|
|
shortcut = "e"
|
|
|
|
[[verbs]]
|
|
execution = "$EDITOR {directory}/{subpath}"
|
|
invocation = "create {subpath}"
|
|
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
|
|
|
|
[[verbs]]
|
|
execution = "$SHELL"
|
|
invocation = "terminal"
|
|
key = "ctrl-t"
|
|
leave_broot = false
|
|
set_working_dir = true
|
|
|
|
[skin]
|
|
''
|
|
}
|
|
'';
|
|
};
|
|
}
|