Midnight Commander colors and themes

Midnight Commander theme howtoMidnight Commander is the most pupular file manager on unix like systems. It's fast and it has all features what you need. But it's only blue and we know, that everyone loves the eyecandy, everyone likes customizing his/her own desktop. But is there any way to custimize the mc?
Yes, and I try to show you, how can you create your theme.

You can change the Midnight Commander colors if you edit the ~/.mc/ini file, where you have to add a new section, named [Colors]. You should define the new colors in this section, for example:

[Colors]
base_color=lightgray,green:normal=green,default:selected=white,gray ...

As you see, it has a simple syntax:

<keyword>=<foregroundcolor>,<backgroundcolor>:<keyword>= ...

The colors are optional, so you can use this:

[Colors]
base_color=lightgray,green:normal=green:selected=,gray ...

It's not the exactly the same as the first version!

Fine, you can change some colors of the filemanager, but which are the keywords? These are:

  • Base colors: normal, selected, marked, markselect, errors, input, reverse, gauge
  • Menu colors: menu, menusel, menuhot, menuhotsel
  • Dialog colors: dnormal, dfocus, dhotnormal, dhotfocus
  • Help colors: helpnormal, helpitalic, helpbold, helplink, helpslink
  • Viewer color: viewunderline
  • Special highlighting colors: executable, directory, link, stalelink, device, special, core
  • Editor colors: editnormal, editbold, editmarked

And which are the colors? I don't know all, but here are some of them:
white, gray, blue, green, yellow, magenta, cyan, red, brown, birghtgreen, brightblue, brightmagenta, brightcyan, brightred, default

Here is the config, what I use:

[Colors]
base_color=lightgray,green:normal=green,default:selected=white,gray:marked=yellow,default:markselect=yellow,gray:directory=blue,default:executable=brightgreen,default:link=cyan,default:device=brightmagenta,default:special=lightgray,default:errors=red,default:reverse=green,default:gauge=green,default:input=white,gray:dnormal=green,gray:dfocus=brightgreen,gray:dhotnormal=cyan,gray:dhotfocus=brightcyan,gray:menu=green,default:menuhot=cyan,default:menusel=green,gray:menuhotsel=cyan,default:helpnormal=cyan,default:editnormal=green,default:editbold=blue,default:editmarked=gray,blue:stalelink=red,default
themed midnight commander

Screenshot about my redesigned Midnight Commander

On the screenshot you can see, that the directory color is blue, the files are green, the executable files are birghtgreen and the selected line is white on a gray background.

And another one, what I use recently:

[Colors]
base_color=lightgray,blue:normal=blue,default:selected=white,brightblue:marked=yellow,default:markselect=yellow,gray:directory=brightblue,default:executable=brightgreen,default:link=cyan,default:device=brightmagenta,default:special=lightgray,default:errors=red,default:reverse=green,default:gauge=green,default:input=white,gray:dnormal=green,gray:dfocus=brightgreen,gray:dhotnormal=cyan,gray:dhotfocus=brightcyan,gray:menu=green,default:menuhot=cyan,default:menusel=green,gray:menuhotsel=cyan,default:helpnormal=cyan,default:editnormal=green,default:editbold=blue,default:editmarked=gray,blue:stalelink=red,default
themed midnight commander

Screenshot about my redesigned Midnight Commander

And here is a small shell script, which will help for you to test your new theme:

#!/bin/sh
mc --colors normal=green,default:selected=brightmagenta,gray:marked=yellow,default:markselect=yellow,gray:directory=blue,default:executable=brightgreen,default:link=cyan,default:device=brightmagenta,default:special=lightgray,default:errors=red,default:reverse=green,default:gauge=green,default:input=white,gray:dnormal=green,gray:dfocus=brightgreen,gray:dhotnormal=cyan,gray:dhotfocus=brightcyan,gray:menu=green,default:menuhot=cyan,default:menusel=green,gray:menuhotsel=cyan,default:helpnormal=cyan,default:editnormal=green,default:editbold=blue,default:editmarked=gray,blue:stalelink=red,default

Save it as mccolortest.sh, make it executable with the chmod +x mccolortest.sh command, and run it with the ./mccolortest.sh command. If you want to change a color, just edit this file. When you done, copy the colors and paste it below the [Colors] section in the ~/.mc/ini. If it doesn't exists, make it yourself.

For more information of the mc redesigning check its manual page.