ranger: add module
This commit is contained in:
parent
b550d074fb
commit
bfc438e9b7
9 changed files with 256 additions and 0 deletions
13
tests/modules/programs/ranger/configuration-rc.conf
Normal file
13
tests/modules/programs/ranger/configuration-rc.conf
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
set column_ratios 1,3,3
|
||||
set confirm_on_delete never
|
||||
set scroll_offset 8
|
||||
set unicode_ellipsis true
|
||||
|
||||
alias e edit
|
||||
alias filter scout -prts
|
||||
alias setl setlocal
|
||||
|
||||
map Q quitall
|
||||
map q quit
|
||||
|
||||
unmap gd
|
||||
2
tests/modules/programs/ranger/configuration-rifle.conf
Normal file
2
tests/modules/programs/ranger/configuration-rifle.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
mime ^text, label editor = vim -- "$@"
|
||||
mime ^text, label pager = less -- "$@"
|
||||
43
tests/modules/programs/ranger/configuration.nix
Normal file
43
tests/modules/programs/ranger/configuration.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.ranger = {
|
||||
enable = true;
|
||||
settings = {
|
||||
column_ratios = "1,3,3";
|
||||
confirm_on_delete = "never";
|
||||
unicode_ellipsis = true;
|
||||
scroll_offset = 8;
|
||||
};
|
||||
aliases = {
|
||||
e = "edit";
|
||||
setl = "setlocal";
|
||||
filter = "scout -prts";
|
||||
};
|
||||
mappings = {
|
||||
Q = "quitall";
|
||||
q = "quit";
|
||||
};
|
||||
extraConfig = "unmap gd";
|
||||
rifle = [
|
||||
{
|
||||
condition = "mime ^text, label editor";
|
||||
command = ''vim -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = "mime ^text, label pager";
|
||||
command = ''less -- "$@"'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/ranger/rc.conf
|
||||
assertFileContent home-files/.config/ranger/rc.conf \
|
||||
${./configuration-rc.conf}
|
||||
|
||||
assertFileExists home-files/.config/ranger/rifle.conf
|
||||
assertFileContent home-files/.config/ranger/rifle.conf \
|
||||
${./configuration-rifle.conf}
|
||||
'';
|
||||
}
|
||||
1
tests/modules/programs/ranger/default.nix
Normal file
1
tests/modules/programs/ranger/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ ranger-configuration = ./configuration.nix; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue