mc: add midnight commander module (#7225)
This commit is contained in:
parent
eee140958a
commit
35e1f5a7c2
10 changed files with 200 additions and 0 deletions
2
tests/modules/programs/mc/basic-configuration
Normal file
2
tests/modules/programs/mc/basic-configuration
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[Panels]
|
||||
show_dot_files=false
|
||||
66
tests/modules/programs/mc/basic-configuration.nix
Normal file
66
tests/modules/programs/mc/basic-configuration.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
programs.mc = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
Panels = {
|
||||
show_dot_files = false;
|
||||
};
|
||||
};
|
||||
|
||||
keymapSettings = {
|
||||
panel = {
|
||||
Up = "up;ctrl-k";
|
||||
};
|
||||
};
|
||||
|
||||
extensionSettings = {
|
||||
EPUB = {
|
||||
Shell = ".epub";
|
||||
Open = "fbreader %f &";
|
||||
};
|
||||
};
|
||||
|
||||
panelsSettings = {
|
||||
Dirs = {
|
||||
current_is_left = false;
|
||||
other_dir = "/home";
|
||||
};
|
||||
};
|
||||
|
||||
fileHighlightSettings = {
|
||||
lua = {
|
||||
extensions = "lua;luac";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
|
||||
mcFolder="home-files/.config/mc"
|
||||
|
||||
assertFileExists "$mcFolder/ini"
|
||||
assertFileExists "$mcFolder/mc.keymap"
|
||||
assertFileExists "$mcFolder/mc.ext.ini"
|
||||
assertFileExists "$mcFolder/panels.ini"
|
||||
assertFileExists "$mcFolder/filehighlight.ini"
|
||||
|
||||
assertFileContent \
|
||||
"$mcFolder/ini" \
|
||||
${./basic-configuration}
|
||||
assertFileContent \
|
||||
"$mcFolder/mc.keymap" \
|
||||
${./mc.keymap}
|
||||
assertFileContent \
|
||||
"$mcFolder/mc.ext.ini" \
|
||||
${./mc.ext.ini}
|
||||
assertFileContent \
|
||||
"$mcFolder/panels.ini" \
|
||||
${./panels.ini}
|
||||
assertFileContent \
|
||||
"$mcFolder/filehighlight.ini" \
|
||||
${./filehighlight.ini}
|
||||
'';
|
||||
}
|
||||
1
tests/modules/programs/mc/default.nix
Normal file
1
tests/modules/programs/mc/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ mc-basic-configuration = ./basic-configuration.nix; }
|
||||
2
tests/modules/programs/mc/filehighlight.ini
Normal file
2
tests/modules/programs/mc/filehighlight.ini
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[lua]
|
||||
extensions=lua;luac
|
||||
3
tests/modules/programs/mc/mc.ext.ini
Normal file
3
tests/modules/programs/mc/mc.ext.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[EPUB]
|
||||
Open=fbreader %f &
|
||||
Shell=.epub
|
||||
2
tests/modules/programs/mc/mc.keymap
Normal file
2
tests/modules/programs/mc/mc.keymap
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[panel]
|
||||
Up=up;ctrl-k
|
||||
3
tests/modules/programs/mc/panels.ini
Normal file
3
tests/modules/programs/mc/panels.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[Dirs]
|
||||
current_is_left=false
|
||||
other_dir=/home
|
||||
Loading…
Add table
Add a link
Reference in a new issue