📜 ⬆️ ⬇️

Color scheme Xoria256 for Midnight Commander

screenshot

I hasten to share the Xoria256 color scheme for the Midnight Commander , which I did, based on the eponymous scheme for the vim editor .

For those who do not know what Midnight Commander is, this is a popular two-pane file manager for UNIX systems (including Linux and Mac OS X). It works in text mode, which makes it indispensable for visualizing the file system and file operations on a remote UNIX system without loading an SSH connection.
')
To use the schema, you need the following:

1. The program terminal emulator with 256 colors

2. Midnight Commander compiled from git

Update: romeo_ordos offers a prebuilt build (.deb) for Debian (x86_64).
Update: the habin browser lybin suggests that in ArchLinux with the installed yaourt everything is simple - $> sudo yaourt -S mc-git

The fact is that the support for 256 colors was added by mc developers only in the last days of December 2010, after the release of 4.7.5.

Mini-instruction "how to build mc from git"

We clone the git repository of the program (on a UNIX computer):
$> git clone git://midnight-commander.org/mc.git

Customize build scripts:
$> cd mc.git
$> ./autogen.sh

Here in Ubuntu, problems may arise, maybe it will help you:
$> sudo apt-get install autopoint libslang2-dev

Set the path for the installation (you can replace it with your own):
$> INSTALL_DIR="/usr/local/mc-git-$(date +%Y-%m-%d)"

For Mac OS X with macports, add:
$> export CFLAGS="-I/opt/local/include -L/opt/local/lib"

Run the configuration:
$> ./configure --prefix="$INSTALL_DIR"
At this stage, you need to carefully look at the output of the previous command, the configuration script may not find any dependencies in your system - correct and try again.

If everything is in order, we compile mc:
$> make
Attention - compilation errors are possible if there is something “wrong” in the system.

Finally, install INSTALL_DIR in the directory:
$> echo "INSTALL_DIR=$INSTALL_DIR"
$> sudo make install


You can run directly from INSTALL_DIR :
$> "$INSTALL_DIR"/bin/mc

Or you can create a couple of symbolic links once:
$> sudo ln -s "$INSTALL_DIR"/bin/* /usr/local/bin/
Attention - in FreeBSD / usr / local / bin / may contain binary mc files installed using the ports system.

We try alternately:
$> mc
$> mcedit
$> mcview
$> mcdiff


Since we installed mc in a separate directory of the form / usr / local / mc-git-2011-01-10 , in which case, we can simply delete it (do not forget about symbolic links) without any consequences for the system, so you can install several versions of the program at once, changing only the value of INSTALL_DIR . By the way, this is true for most programs under UNIX.

3. Environment variable TERM = xterm-256color

Ensure that the TERM environment variable (indicating the terminal type) has the value “xterm-256color”.

You can check with the command:
$> env | grep TERM=

To assign TERM on an ongoing basis, it is usual to add such a line to the .profile file in the user's home directory:
export TERM=xterm-256color

Or, you can specify TERM to only one application at startup.
Like this:
$> TERM=xterm-256color mc

Or so:
$> env TERM=xterm-256color mc

4. File with color settings - xoria256.ini

Update: On January 12, 2011, the Xoria256 skin was added to the master branch of the git repository, so if you just installed mc from git, you already have this skin, you don’t need to do anything else.

Create a directory ~ / .mc / skins /
$> mkdir -p ~/.mc/skins

Copy the xoria256.ini file to this directory:
$> cd ~/.mc/skins
$> wget "http://dl.dropbox.com/u/4663634/mc-xoria256-skin/xoria256.ini"


Or like this:
$> curl "http://dl.dropbox.com/u/4663634/mc-xoria256-skin/xoria256.ini" > ~/.mc/skins/xoria256.ini

Everything can be used by pointing the topic explicitly:
$> mc -S xoria256

Or by specifying a new topic in the file ~ / .mc / ini
$> mcedit ~/.mc/ini
Find inside the line of the form "skin = default" and replace with "skin = xoria256"
$> mc

Is done

Thanks for attention.

Thanks to the Midnight Commander development team and Dmitry Zotikov (author of the Xoria256 color theme for vim).

Source: https://habr.com/ru/post/111605/


All Articles