mc: add midnight commander module (#7225)

This commit is contained in:
Egor Konovalov 2025-06-09 16:25:11 +02:00 committed by GitHub
parent eee140958a
commit 35e1f5a7c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 200 additions and 0 deletions

View file

@ -0,0 +1,2 @@
[Panels]
show_dot_files=false

View 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}
'';
}

View file

@ -0,0 +1 @@
{ mc-basic-configuration = ./basic-configuration.nix; }

View file

@ -0,0 +1,2 @@
[lua]
extensions=lua;luac

View file

@ -0,0 +1,3 @@
[EPUB]
Open=fbreader %f &
Shell=.epub

View file

@ -0,0 +1,2 @@
[panel]
Up=up;ctrl-k

View file

@ -0,0 +1,3 @@
[Dirs]
current_is_left=false
other_dir=/home