Reprinted from Plug-and-Pray IT blog on Oct 30, 2012
September 6, 2009 | Plug-and-Pray IT blog
Editing Midnight Commander's color scheme In a previous post I was sort of laying out a "formula" on how to transform
your Midnight Commander default color scheme into a transparent skin, without talking too much about how you can change
the other colors.
To my great shame, I didn't pay too much attention to this blog or to the comments asking for further advice. I found
Mateus' comment rather late (just now!) and decided to dig further, in order to find out how exactly to deal with more
refined color changes, while still keeping the transparent background (in both in Midnight Commander and its editor).
So the first thing to know is which are the colors that Midnight Commander supports; the available colors are:
black gray lightgray white red brightred green brightgreen blue brightblue magenta brightmagenta cyan brightcyan
brown yellow default
The "default" color is the one giving out the nice transparency.
Now, there are certain "components" in Midnight Commander's display that can have their colors altered. Here they
are:
Each and every one of these "components" can have its own colors set accordingly to the user's wish. Each component
is assigned a color pair and must be followed by a colon (':') in order to separate it from the color pair of the next
component. Here's how this basic syntax must look like:
component=foreground_color,background_color:
When you start modifying the color scheme in your Midnight Commander configuration file (located at ~/.mc/ini), you
just have to add a section called "[Colors]" and proceed with enumerating the color pairs. So you'd have something like
this:
For increased readability, I will "truncate" that long line, adding a backslash ('\') to indicate that in fact what
follows on the next line should be adjacent to the text on the previous line. This being said, the [Colors] section
could look like this:
Now that you've gotten the hang of this, let's see how the [Colors] section looks like in the default Midnight Commander
color scheme (you know, the "ugly" one, with blue and dull cyan):
IMPORTANT NOTE: For visual impact's sake and due to Blogspot breaking long lines, I wrote each color pair on a single
row, followed by a backslash ('\'). Please note that this does NOT work in the ~/.mc/ini file, so the final [Colors]
section in your Midnight Commander configuration file MUST be a SINGLE line with no spaces and with each color pair
separated from the next one by a colon (':').
Now let's see. What you want to change first of all is most of the background of these "components", such that the
display will be one with a neat looking transparent background. So first of all you might want to make a few changes
to these color pairs by replacing the background color "blue" with "default". After doing these changes, your [Colors]
section will look a bit like this:
Now you've got the basic "Midnight Commander transparent scheme" that was the result of this post.
Proceeding to Mateus' question, regarding how to change the rest of the colors now, it's about the same as before.
What he didn't like there (and as a matter of fact I don't quite like it, either) is the dull cyan that's still seen
in the following places:
the bottom line (the one displaying the F1...F10 function keys); the line that signifies the current selection, the
"prompt" which shows you on which file/directory you're "on" at a given moment; the uppermost line (the "menu" line);
the menus themselves, once you open them. To "fix" issues 1, 2, and 3 it is sufficient to alter the value of the "selected"
parameter. Notice how it is initially
selected=black,cyan:\
My personal choice is to replace the background cyan, which I don't really like, with green. To do this, I'll change
this color pair to
selected=black,green:\
You can, of course, change the foreground color as well. For me, it's alright to keep the foreground (the text) "black".
You can change it to whatever suits your taste.
To "fix" issue number 4 in the list above, you need to change the "menu" parameter. To get it transparent, just change
the "cyan" background to "default". Make other adjustments as you see fit. In other words, change
menu=white,cyan:\
into, for instance,
menu=ligthgray,default:\
However, there are a few "leftovers" from the default color scheme.
One of them is the parameter regarding the hotkeys in the menus (the "underlined" character on most of the menu options,
showing you what key you can press in order to access that option faster than by moving to it with the arrow keys).
This color pair is called "menuhot". I changed it from
menuhot=yellow,cyan:\
into
menuhot=yellow,default:\
Another thing which might bother you is the color of the line in the panel you're in when you've "selected all" files
(when you've pressed the "*" key). This parameter is called "markselect". I changed it from
markselect=yellow,cyan:\
into
markselect=white,green:\
The color pair of the selected buttons in dialogs is called "dfocus". I changed mine from
dfocus=black,cyan:\
into
dfocus=black,green:\
In the "focused" buttons or options, the underlined character is called "dhotfocus". I changed mine from
dhotfocus=blue,cyan:\
into
dhotfocus=brightgreen,green:\
since the background color was already green, after I modified the "dfocus" color pair.
The other buttons or options in the dialogs which have hotkeys assigned to them, but which are not "focused" (the
buttons/options that you're not located on at a given moment) are still displayed in blue on a light gray background.
This color pair is referred to as "dhotnormal". Since the blue looks a bit odd there, I changed
dhotnormal=blue,lightgray:\
into
dhotnormal=brightgreen,default:\
Well, this is nice, in window titles and on normal (unfocused) hotkeys I get the transparent background. The problem
now is that the rest of the dialog window is still light gray. To change this (to make the window transparent as well),
you only need to alter the "dnormal" color pair, such as changing it from
dnormal=black,lightgray:\
into
dnormal=white,default:\
You may notice that the input fields stay cyan, as well; you find these fields in quite a lot of dialog boxes. To
alter this, I changed
input=black,cyan:\
into
input=black,green:\
One thing which I consider useful is to have symbolic links displayed in bright cyan (as in the colored listings
in the terminal). So I just changed
link=lightgray,default:\
into
link=brightcyan,default:\
Now, regarding the rest of the color pairs, I don't really know what they do. However, if at some point after using
Midnight Commander more with this new, neat, transparent/green color scheme you'll notice unwanted leftovers, you can
try out other changes in the color pairs values, one at a time, until you determine the troublesome one.
After operating the changes above, my [Colors] section in ~/.mc/ini now looks like this:
I need to direct you to the "IMPORTANT NOTE" above. The final [Colors] section above is written like this - one pair
on each row, followed by a backslash - for clarity's sake. The actual final [Colors] section in your ~/.mc/ini file
will have to be a one-liner, with no blanks and no backslashes. So it will probably look similar to this:
Now, the next time you start mc, the new color scheme will take effect.
As a bonus, here's a picture of how my Midnight Commander looks like, with this new "skin" on:
Posted by Alexandra at 1:54 PM Labels: color scheme, mc, transparency 21 comments: Jared (Dogmeat)September 11, 2009
2:27 AM just saying hello ;)
ReplyDelete Alex.September 11, 2009 6:49 AM Hello Jared! Nice to see you around. As for social networking sites,
I'm not into them at all.
ReplyDelete AnonymousSeptember 12, 2009 2:56 AM neither am I- I use it to keep track of bands, but I couldn't put
my name without a website... you'll see that I have no "human" friends :P
ReplyDelete AnonymousSeptember 17, 2009 3:01 AM So, why'd you quit? I'm not asking you to come back or anything,
but it IS a lot loess lively now. ;)
ReplyDelete AnonymousSeptember 17, 2009 3:02 AM Damn, sorry to spam, but I have to. less*
ReplyDelete Alex.September 17, 2009 6:47 AM Nice pic ;)
Jared, you can e-mail/IM me. I'm sure I left some contact details when I left.
Well, I left because I realized that my other interests were taking too much of my time and would not allow me to
play FRP anymore, taking care of the administrating/social issues as well.
Now I'm just working, learning and reading mainly.
ReplyDelete AnonymousSeptember 19, 2009 7:00 PM I was going to email you originally, but I noticed the email address
was @futurerp.
The few times I've been on IM, you haven't. :P
ReplyDelete AnonymousSeptember 21, 2009 6:03 AM Excellent post!
ReplyDelete AnonymousMay 19, 2010 3:16 AM still can't get the bar at the bottom to change... no matter what options
i change, the numbers are still white/black and the text is always black/cyan :(
ReplyDelete AlexandraMay 19, 2010 3:56 AM Damn. You're right. Something changed in the meantime. I'm sure it did,
otherwise the above screenshot would make no sense. Up until this something-got-broken-in-mc unfortunate event, the
"status bar" (the menu with the F1...F10 options) was afected by the "selected=foreground/background" keyword.
ReplyDelete AnonymousAugust 6, 2010 11:00 PM How to fix the problem decribed above?
ReplyDelete AnonymousAugust 21, 2010 11:59 AM i have the same problem with F's menu color =(
ReplyDelete kamisoriJanuary 27, 2011 6:49 PM this fixes some colors back to transparent for mc 4.7.5
ReplyDelete AnonymousFebruary 5, 2011 7:31 PM do you have a fix for this? id like to have the same colors as the
screen shot but so far its not working
ReplyDelete AnonymousFebruary 5, 2011 7:36 PM this is a Response to the last post as it was me and I found the answer
If you go into your terminal profile and change the cyan color in the colors section to green or whatever you want
it will change on Midnight Commander.
hope this was helpful!
ReplyDelete AnonymousAugust 14, 2011 3:55 AM Hello this work for me, but when I "sudo mc" nothing change the default
color BLUE background is appeared back. Is this a bug that MC having. I can't seem to get transparency while I'm in
sudo. Is it something thing do with the owner ship. I would say it's only work for user not globally. Any suggestion
is greatly appreiciated.
thanks
ReplyDelete binarymeOctober 5, 2011 3:39 PM Love this! thanks.
ReplyDelete JugheadMarch 5, 2012 10:32 AM This, and all others have one issue: if you write some code and place some
tab characters then you will be disturbed by cyan background of this characters
ReplyDelete Nerd ProgreApril 11, 2012 6:44 PM For the life of me I can't seem to find where the Midnight Commander
config files are stored, because ".mc" is not under /home/username anymore!!
DAMN I wish Linux devs would stop shuffling things around....
FC
ReplyDelete Nerd ProgreApril 11, 2012 6:53 PM Damn. I will answer myself. With the help from the Fedora mailing list...
the config files are now in
~/.config/mc/ plus ~/.local/share/mc/ for other files.
FC
ReplyDelete Alekseiy SerdyukSeptember 10, 2012 1:18 PM Thanks, just what I need!
ReplyDelete Add comment Load more...
Links to this post Create a Link
Newer Post Older Post Home Subscribe to: Post Comments (Atom)
About Plug-and-Pray Hello! I hope you can find something of interest on this blog.
Please don't hesitate to comment and ask questions. If I'm able to assist, I'll reply as soon as possible or even
write a "follow-up" post after investigating the problem further.
The above would compress the current directory (%d) to a file also in the current directory. If you want to compress the directory
pointed to by the cursor rather than the current directory, use %f instead:
tar -czf %f_$(date '+%%Y%%m%%d').tar.gz %f
mc handles escaping of special characters so there is no need to put %f in quotes.
By the way, midnight commander's special treatment of percent signs occurs not just in the user menu file but also at the command
line. This is an issue when using shell commands with constructs like ${var%.c} . At the command line, the same as
in the user menu file, percent signs can be escaped by doubling them.
Skip to content
April 24, 2011
by
Admin
Important
This is an edited version of a post that originally appeared on a blog called The Michigan
Telephone Blog, which was written by a friend before he decided to stop blogging. It is
reposted with his permission. Comments dated before the year 2013 were originally posted
to his blog.
If you've installed
Midnight
Commander
and haven't changed the default colors, when you try to access a dropdown menu you
may see this:
Midnight
Commander -- Original Colors
REALLY hard to read that menu, isn't it? Wouldn't you rather see this?
Midnight
Commander -- Changed Colors
To fix the unreadable menus, just make sure Midnight Commander is
not
open,
then use any text editor (such as nano) to open ~/.mc/ini:
nano ~/.mc/ini
Assuming that there is no existing [Colors] section in the file, just add this at the bottom
of the file (if the second line exceeds the blog column width, just use copy and paste to get it
all):
If there is an existing [Colors] section, you can try tweaking it using the parameters shown
above. If you have a very recent version of Midnight Commander (which you probably will have if
you are running Ubuntu), then instead of
menu=
you'll need to use
menunormal=
, as shown here:
Note that for some reason the base_color parameter must appear, or the other items are
ignored. Save the change, exit the editor, and open Midnight Commander. If you then close
Midnight Commander, you may find that the position of the [Colors] section has moved within the
ini file -- apparently Midnight Commander rewrites the file when you close it -- but if you don't
like the changes you can remove the [Colors] section to reverse the change.
I need to know how to check the current colour for mc and how to change it.
I google it and they talk about changeing some initial file /.mc/ini which i have no idea
(no one ever gives full filename.)and i cant find it at all. Wasted an hour of my life. I
just need the simplest way to change it, not another 10+ steps to change a stupid
colour.
gengisdave
12-22-2014 03:22 AM
in some distros (mine, e.g.) it is located in ~/.local/mc/ini
sycamorex
12-22-2014 03:24 AM
This is the full filename. Mind you on my distro it's in ~/.config/mc/ini
Find / Create this file and add the following (obviously change the colour values):
The syntax is: variable=foreground_colour,background_colour
Code:
[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
Also, have a look at this: http://blog.mybox.ro/2010/05/10/skin...ght-commander/
Editing
Midnight Commander's color scheme In a previous
post I was sort of laying out a "formula" on how to transform your Midnight Commander
default color scheme into a trasnparent skin, without talking too much about how you can change
the other colors.
To my great shame, I didn't pay too much attention to this blog or to the comments asking
for further advice. I found Mateus' comment rather late (just now!) and decided to dig further,
in order to find out how exactly to deal with more refined color changes, while still keeping
the transparent background (in both in Midnight Commander and its editor).
So the first thing to know is which are the colors that Midnight Commander supports; the
available colors are:
black
gray
lightgray
white
red
brightred
green
brightgreen
blue
brightblue
magenta
brightmagenta
cyan
brightcyan
brown
yellow
default
The " default " color is the one giving out the nice transparency.
Now, there are certain "components" in Midnight Commander's display that can have their
colors altered. Here they are:
Each and every one of these "components" can have its own colors set accordingly to the
user's wish. Each component is assigned a color pair and must be followed by a colon (':') in
order to separate it from the color pair of the next component. Here's how this basic syntax
must look like:
component=foreground_color,background_color:
When you start modifying the color scheme in your Midnight Commander configuration file
(located at ~/.mc/ini ), you just have to add a section called " [Colors] " and proceed with
enumerating the color pairs. So you'd have something like this:
For increased readability, I will "truncate" that long line, adding a backslash ('\') to
indicate that in fact what follows on the next line should be adjacent to the text on the
previous line. This being said, the [Colors] section could look like this:
Now that you've gotten the hang of this, let's see how the [Colors] section looks like in
the default Midnight Commander color scheme (you know, the "ugly" one, with blue and dull
cyan):
IMPORTANT NOTE: For visual impact's sake and due to Blogspot breaking long lines, I wrote
each color pair on a single row, followed by a backslash ('\'). Please note that this does NOT
work in the ~/.mc/ini file, so the final [Colors] section in your Midnight Commander
configuration file MUST be a SINGLE line with no spaces and with each color pair separated from
the next one by a colon (':').
Now let's see. What you want to change first of all is most of the background of these
"components", such that the display will be one with a neat looking transparent background. So
first of all you might want to make a few changes to these color pairs by replacing the
background color "blue" with "default". After doing these changes, your [Colors] section will
look a bit like this:
Now you've got the basic "Midnight Commander transparent scheme" that was the result of
this
post .
Proceeding to Mateus' question, regarding how to change the rest of the colors now, it's
about the same as before. What he didn't like there (and as a matter of fact I don't quite like
it, either) is the dull cyan that's still seen in the following places:
the bottom line (the one displaying the F1...F10 function keys);
the line that signifies the current selection, the "prompt" which shows you on which
file/directory you're "on" at a given moment;
the uppermost line (the "menu" line);
the menus themselves, once you open them.
To "fix" issues 1, 2, and 3 it is sufficient to alter the value of the " selected "
parameter. Notice how it is initially
selected=black,cyan:\
My personal choice is to replace the background cyan, which I don't really like, with green.
To do this, I'll change this color pair to
selected=black,green:\
You can, of course, change the foreground color as well. For me, it's alright to keep the
foreground (the text) "black". You can change it to whatever suits your taste.
To "fix" issue number 4 in the list above, you need to change the " menu " parameter. To get
it transparent, just change the "cyan" background to "default". Make other adjustments as you
see fit. In other words, change
menu=white,cyan:\
into, for instance,
menu=ligthgray,default:\
However, there are a few "leftovers" from the default color scheme.
One of them is the parameter regarding the hotkeys in the menus (the "underlined" character
on most of the menu options, showing you what key you can press in order to access that option
faster than by moving to it with the arrow keys). This color pair is called " menuhot ". I
changed it from
menuhot=yellow,cyan:\
into
menuhot=yellow,default:\
Another thing which might bother you is the color of the line in the panel you're in when
you've "selected all" files (when you've pressed the "*" key). This parameter is called "
markselect ". I changed it from
markselect=yellow,cyan:\
into
markselect=white,green:\
The color pair of the selected buttons in dialogs is called " dfocus ". I changed mine
from
dfocus=black,cyan:\
into
dfocus=black,green:\
In the "focused" buttons or options, the underlined character is called " dhotfocus ". I
changed mine from
dhotfocus=blue,cyan:\
into
dhotfocus=brightgreen,green:\
since the background color was already green, after I modified the " dfocus " color
pair.
The other buttons or options in the dialogs which have hotkeys assigned to them, but which
are not "focused" (the buttons/options that you're not located on at a given moment) are still
displayed in blue on a light gray background. This color pair is referred to as " dhotnormal ".
Since the blue looks a bit odd there, I changed
dhotnormal=blue,lightgray:\
into
dhotnormal=brightgreen,default:\
Well, this is nice, in window titles and on normal (unfocused) hotkeys I get the transparent
background. The problem now is that the rest of the dialog window is still light gray. To
change this (to make the window transparent as well), you only need to alter the " dnormal "
color pair, such as changing it from
dnormal=black,lightgray:\
into
dnormal=white,default:\
You may notice that the input fields stay cyan, as well; you find these fields in quite a
lot of dialog boxes. To alter this, I changed
input=black,cyan:\
into
input=black,green:\
One thing which I consider useful is to have symbolic links displayed in bright cyan (as in
the colored listings in the terminal). So I just changed
link=lightgray,default:\
into
link=brightcyan,default:\
Now, regarding the rest of the color pairs, I don't really know what they do. However, if at
some point after using Midnight Commander more with this new, neat, transparent/green color
scheme you'll notice unwanted leftovers, you can try out other changes in the color pairs
values, one at a time, until you determine the troublesome one.
After operating the changes above, my [Colors] section in ~/.mc/ini now looks like this:
I need to direct you to the " IMPORTANT NOTE " above. The final [Colors] section above is
written like this - one pair on each row, followed by a backslash - for clarity's sake. The
actual final [Colors] section in your ~/.mc/ini file will have to be a one-liner, with no
blanks and no backslashes. So it will probably look similar to this:
Note #1: In the above 'code' block, there is only one line below [Colors] . I truncated the
line with the backslash because of blogspot rendering issues. You just write all that on one
single line, without the "\" (backslash-es).
Note #2: At the end of this line, the " editnormal,=default: " option means that mcedit will
have transparent background in your console, as well.
To my great shame, I didn't pay too much attention to this blog or to the comments asking
for further advice. I found Mateus' comment rather late (just now!) and decided to dig further,
in order to find out how exactly to deal with more refined color changes, while still keeping
the transparent background (in both in Midnight Commander and its editor).
So the first thing to know is which are the colors that Midnight Commander supports; the
available colors are:
black
gray
lightgray
white
red
brightred
green
brightgreen
blue
brightblue
magenta
brightmagenta
cyan
brightcyan
brown
yellow
default
The " default " color is the one giving out the nice transparency.
Now, there are certain "components" in Midnight Commander's display that can have their
colors altered. Here they are:
Each and every one of these "components" can have its own colors set accordingly to the
user's wish. Each component is assigned a color pair and must be followed by a colon (':') in
order to separate it from the color pair of the next component. Here's how this basic syntax
must look like:
component=foreground_color,background_color:
When you start modifying the color scheme in your Midnight Commander configuration file
(located at ~/.mc/ini ), you just have to add a section called " [Colors] " and proceed with
enumerating the color pairs. So you'd have something like this:
For increased readability, I will "truncate" that long line, adding a backslash ('\') to
indicate that in fact what follows on the next line should be adjacent to the text on the
previous line. This being said, the [Colors] section could look like this:
Now that you've gotten the hang of this, let's see how the [Colors] section looks like in
the default Midnight Commander color scheme (you know, the "ugly" one, with blue and dull
cyan):
IMPORTANT NOTE: For visual impact's sake and due to Blogspot breaking long lines, I wrote
each color pair on a single row, followed by a backslash ('\'). Please note that this does NOT
work in the ~/.mc/ini file, so the final [Colors] section in your Midnight Commander
configuration file MUST be a SINGLE line with no spaces and with each color pair separated from
the next one by a colon (':').
Now let's see. What you want to change first of all is most of the background of these
"components", such that the display will be one with a neat looking transparent background. So
first of all you might want to make a few changes to these color pairs by replacing the
background color "blue" with "default". After doing these changes, your [Colors] section will
look a bit like this:
Now you've got the basic "Midnight Commander transparent scheme" that was the result of
this
post .
Proceeding to Mateus' question, regarding how to change the rest of the colors now, it's
about the same as before. What he didn't like there (and as a matter of fact I don't quite like
it, either) is the dull cyan that's still seen in the following places:
the bottom line (the one displaying the F1...F10 function keys);
the line that signifies the current selection, the "prompt" which shows you on which
file/directory you're "on" at a given moment;
the uppermost line (the "menu" line);
the menus themselves, once you open them.
To "fix" issues 1, 2, and 3 it is sufficient to alter the value of the " selected "
parameter. Notice how it is initially
selected=black,cyan:\
My personal choice is to replace the background cyan, which I don't really like, with green.
To do this, I'll change this color pair to
selected=black,green:\
You can, of course, change the foreground color as well. For me, it's alright to keep the
foreground (the text) "black". You can change it to whatever suits your taste.
To "fix" issue number 4 in the list above, you need to change the " menu " parameter. To get
it transparent, just change the "cyan" background to "default". Make other adjustments as you
see fit. In other words, change
menu=white,cyan:\
into, for instance,
menu=ligthgray,default:\
However, there are a few "leftovers" from the default color scheme.
One of them is the parameter regarding the hotkeys in the menus (the "underlined" character
on most of the menu options, showing you what key you can press in order to access that option
faster than by moving to it with the arrow keys). This color pair is called " menuhot ". I
changed it from
menuhot=yellow,cyan:\
into
menuhot=yellow,default:\
Another thing which might bother you is the color of the line in the panel you're in when
you've "selected all" files (when you've pressed the "*" key). This parameter is called "
markselect ". I changed it from
markselect=yellow,cyan:\
into
markselect=white,green:\
The color pair of the selected buttons in dialogs is called " dfocus ". I changed mine
from
dfocus=black,cyan:\
into
dfocus=black,green:\
In the "focused" buttons or options, the underlined character is called " dhotfocus ". I
changed mine from
dhotfocus=blue,cyan:\
into
dhotfocus=brightgreen,green:\
since the background color was already green, after I modified the " dfocus " color
pair.
The other buttons or options in the dialogs which have hotkeys assigned to them, but which
are not "focused" (the buttons/options that you're not located on at a given moment) are still
displayed in blue on a light gray background. This color pair is referred to as " dhotnormal ".
Since the blue looks a bit odd there, I changed
dhotnormal=blue,lightgray:\
into
dhotnormal=brightgreen,default:\
Well, this is nice, in window titles and on normal (unfocused) hotkeys I get the transparent
background. The problem now is that the rest of the dialog window is still light gray. To
change this (to make the window transparent as well), you only need to alter the " dnormal "
color pair, such as changing it from
dnormal=black,lightgray:\
into
dnormal=white,default:\
You may notice that the input fields stay cyan, as well; you find these fields in quite a
lot of dialog boxes. To alter this, I changed
input=black,cyan:\
into
input=black,green:\
One thing which I consider useful is to have symbolic links displayed in bright cyan (as in
the colored listings in the terminal). So I just changed
link=lightgray,default:\
into
link=brightcyan,default:\
Now, regarding the rest of the color pairs, I don't really know what they do. However, if at
some point after using Midnight Commander more with this new, neat, transparent/green color
scheme you'll notice unwanted leftovers, you can try out other changes in the color pairs
values, one at a time, until you determine the troublesome one.
After operating the changes above, my [Colors] section in ~/.mc/ini now looks like this:
I need to direct you to the " IMPORTANT NOTE " above. The final [Colors] section above is
written like this - one pair on each row, followed by a backslash - for clarity's sake. The
actual final [Colors] section in your ~/.mc/ini file will have to be a one-liner, with no
blanks and no backslashes. So it will probably look similar to this:
Koszti Lajos Midnight 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:
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
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 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 .
Also, in 4.8.3 here, I copied the first example scheme line and my colors are different. I
can't even set the background of the select bar to gray (or "grey"): it gets replaced with
black. Also, the panel headings remain blue here, unlike the (first) screenshot, and I can
see no corresponding tag in the line anyway.
Good intro, regardless. Someone should post a pointer to a more up-to-date one, though, as
Google seems to find this old thread within the top few hits. Király! ;)
The colors are depends on the color settings of your terminal. I don't have those settings
anymore which was when I posted this article, but here is my current. If I'm right, it's
similar to that. Put it into your .Xdefaults
Midnight Commander supports skins starting from 4.7.0-pre3 version. You can download a
skin with black as a main color from here:
http://zool.in.ua/software/bluemoon/
I am using MC on my router ASUS WL-500GP and I am developing php scripts on it. but as I
see MC in openwrt (kmaikaze 8.09) does not use syntax-highlighting and it is very
unconfortable.
Do you know how could I turn it on? I have already downloaded php.syntax file and put it into
/usr/share/syntax dir but it does not seem to work. is it possible that some support is not
compiled into my version or the syntax file must be compiled to another format?
Br Zé.
hei ajnasz, your color theme so very nice, keep my eye on my pc longer than usual. Well, i
don't have much time to do more explore with this tricks. I think your taste so cool. If you
have any kind of theme, i should be try it. :-)
I didn't find anything about it. By the way, since the extension doesn't determinate the
file type in UNIX like systems, it wouldn't make any sense to do it.
Don't be silly. Mp3 is just music, txt is text, doc is document. The only thing, which is
not exactly determinable is the executables, but whatever, it has +x flag.
Also, you should know that most modern terminal applications allow you to redefine the
exact shade of those 16 colors.
Some of them (such as the Gnome or KDE terminals) may have a place under their preferences
where you can redefine the colors.
Older terminals, such as aterm, use ~/.Xdefaults for this. You can edit that file and add
lines like this: "aterm*color1: OrangeRed" (without the quotes). What I've done with that is
tell aterm that the "color1" (which was red) should now be "OrangeRed". See
/usr/share/X11/rgb.txt for valid color names. You can use *color0 through *color15. So when
you'll say "red" in MC's ini file, and if you use aterm, it will get replaced by color1 in
~/.Xdefaults and changed to OrangeRed. (Sorry, I don't remember the mappings between the
names used by MC and 0-15 in Xdefaults by heart.)
The Last but not LeastTechnology is dominated by
two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt.
Ph.D
FAIR USE NOTICEThis site contains
copyrighted material the use of which has not always been specifically
authorized by the copyright owner. We are making such material available
to advance understanding of computer science, IT technology, economic, scientific, and social
issues. We believe this constitutes a 'fair use' of any such
copyrighted material as provided by section 107 of the US Copyright Law according to which
such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free)
site written by people for whom English is not a native language. Grammar and spelling errors should
be expected. The site contain some broken links as it develops like a living tree...
You can use PayPal to to buy a cup of coffee for authors
of this site
Disclaimer:
The statements, views and opinions presented on this web page are those of the author (or
referenced source) and are
not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society.We do not warrant the correctness
of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be
tracked by Google please disable Javascript for this site. This site is perfectly usable without
Javascript.