:: [DNG] mc (Midnight Commander) power…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Walter Dnes
日付:  
To: Devuan List
題目: [DNG] mc (Midnight Commander) power tweaks
1) In .bashrc set...
alias mc='mc -a 2>/dev/null'

* the "-a" is for xterm which can't handle line-drawing characters in X.
You can remove "-a" if you use one of the other terms are able to
handle line-drawing characters in X.

* the "2>/dev/null" redirects error messages to /dev/null. Some GTK
apps whine about not being able to access the accessability bridge.
adding...
export NO_AT_BRIDGE=1
...to .bashrc is *SUPPOSED* to suppress those messages. Suppression
does work when an app is invoked from the command prompt. But mc
doesn't seem to pass that environment variable when launching an app
and the accessability error messages still pop up. In addition mupdf
whines to stderr about ICU support not being available.

2) Mods to extension menu

Under "mc", I use geeqie for images, gnumeric for spreadsheets,
mplayer for videos, and mupdf for pdf files. Substitute your preferred
programs. In ~/.config/mc/mc.ex.ini, right after the lines...

[mc.ext.ini]
Version=4.0

...I insert the following...

###Start custom stuff###
[image]
Regex=\\.(gif|jpeg|jpg|png|jng|mng|tiff|xbm|xpm|ico|svg|pgm|ppm|netpbm|webp)$
RegexIgnoreCase=true
Open=/usr/bin/geeqie %p &
View=/usr/bin/geeqie %p &

[spreadsheet]
Regex=\\.(csv|gnumeric|xl[sw]|xlsx)$
RegexIgnoreCase=true
Open=/usr/bin/gnumeric %p &

[video]
Regex=\\.(as[fx]|avi|divx|fl[icv]|m4v|mkv|mov|mp4|mpe?g|mts|ogv|qt|ra?m|ts|vob|webm|wmv)$
RegexIgnoreCase=true
Open=/usr/bin/mplayer %p &

[pdf]
Regex=\\.pdf$
RegexIgnoreCase=true
Open=/usr/bin/mupdf %p &
View=/usr/bin/mupdf %p &

#####End custom stuff###

NOTES:
1) By default, "mc" will open/render only one file at a time, and remain
locked to it. If you want to open multiple files, you have to fire up
multiple instances of "mc"... ugh. The trailing "&" in the open/view
command forks the app-launching process, and returns "mc" to user
control immediately. You can open up multiple files of the same or
different types simultaneously from one "mc" session.

2) For some reason I have to comment out (or delete?) the stanza...
===========
[pdf]
Type=^PDF
Open=/usr/lib/mc/ext.d/doc.sh open pdf
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view pdf
===========
...later down in the extension file, for my mupdf invocation to work.

3) Extension file edits made from the mc "Command" menu take effect
immediately. If you edit ~/.config/mc/mc.ex.ini manually outside "mc",
the changes will only take effect in new "mc" sessions.

--
Walter Dnes <waltdnes@???>
There are 2 types of people in this world
1) Those who can extrapolate from incomplete data