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.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user