Files
nixos-config/modules/assets/mc/menu
T
daniil-berg eab578e699 feat(mc): add midnight commander with declarative config
Public baseline module: installs `mc` plus `ouch` (backs the F2 pack/unpack
entries, archive format inferred from the extension), and ships `ini`, `menu`,
and a generated `panels.ini` into `$XDG_CONFIG_HOME/mc`.

`local.mc.otherDir` exposes the other-panel start dir as an option defaulting
to `config.home.homeDirectory`, so the one personal value isn't baked in. The
F2 user menu is trimmed to the entries that match this config (imv/zathura/mpv
openers, ouch pack/unpack, man view); the stock rcp/uudecode/news/latex cruft
is dropped. `auto_save_setup=false` keeps mc from rewriting the read-only store
symlinks on exit.
2026-07-10 22:46:32 +02:00

31 lines
854 B
Plaintext

shell_patterns=0
# F2 user menu. Format macros: %f current file · %d current dir · %s tagged
# files else current · %t tagged files · %D other panel's dir. Full list: mc(1).
c Pack selected into an archive (ouch — format from the name's extension)
NAME=%{Archive name, e.g. stuff.tar.zst}
ouch compress %s "$NAME"
x Unpack archive here (ouch)
ouch decompress %f
i Open file with image viewer (imv)
imv %f
I Open current directory with image viewer (imv)
imv %d
p Open file with document viewer (zathura)
zathura %f
v Play file with mpv
mpv %f
V Play current directory with mpv
mpv %d
m View a man page
MAN=%{Enter manual name}
%view{ascii,nroff} MANROFFOPT='-c -Tlatin1' MAN_KEEP_FORMATTING=1 man -P cat "$MAN"