Skip to main content
Version: 0.3.3

mc

Generates a skin for Midnight Commander, the venerable terminal file manager. The output is a single INI file dropped into MC's skin directory. Colours are converted from tinct's 24-bit hex values to the nearest xterm-256 indices via the xterm256 template function, so the skin renders correctly on any 256-colour terminal.

Installation

Built into tinct — nothing to install separately. tinct generate -o mc works out of the box.

Quick start

tinct generate -i image -p ~/Pictures/wallpaper.jpg -o mc

Generated files

FilePathRole
tinct.ini~/.local/share/mc/skins/tinct.iniSkin. MC INI format covering all themable sections — [core] (panel, input, gauges), [dialog], [error], [filehighlight] (directory / executable / symlink / archive colours), [menu], [popupmenu], [buttonbar], [statusbar], [help], [editor], [viewer], [diffviewer], plus the line-drawing and widget glyph blocks.

tinct.ini is declared 256colors = true; on an 8-colour terminal MC will fall back to its default skin.

Integration

MC discovers skins by filename in $XDG_DATA_HOME/mc/skins/ (default ~/.local/share/mc/skins/). The skin's "name" is the filename without .ini — so this plugin's output is selectable as tinct.

Three ways to apply it:

  1. Per-launch flag:

    mc -S tinct
  2. Persistent in ~/.config/mc/ini (under the [Midnight-Commander] section):

    skin=tinct
  3. From inside MC: F9OptionsAppearance → pick tinct from the list.

Reload behaviour

Automatic

None. MC reads its skin once at startup; there is no hot-reload signal, IPC, or watcher.

Manual fallback

Quit and relaunch MC after regenerating the skin:

mc -S tinct

Alternatively, while inside MC, F9OptionsAppearance and re-select tinct — this re-reads the skin file without exiting the process.

Uninstall / revert

  1. Remove the config line from ~/.config/mc/ini:

    sed -i '/^skin=tinct$/d' ~/.config/mc/ini

    Also drop -S tinct from any launcher script / shell alias.

  2. Delete the generated file:

    rm ~/.local/share/mc/skins/tinct.ini
  3. Reload to drop the theme: quit and relaunch MC. The next launch will fall back to the default skin (or whatever you set skin= to).

  4. External state: this plugin only writes to ~/.local/share/mc/skins/. No further cleanup is required.

Flags

FlagDefaultDescription
--mc.output-dir~/.local/share/mc/skinsOverride the output directory

Colour role mapping

MC uses xterm-256 indices, not hex; the plugin converts every tinct role at template time via the xterm256 function and emits indices like colorN.

MC sectionKeyTinct roleNotes
[core]_default_foreground / backgroundDefault panel colour
[core]selectedonAccent1 / accent1Highlight bar
[core]markedaccent2Tagged files
[core]inputforeground / surfaceContainerLowInput fields
[core]headeraccent1Panel header (bold)
[dialog]_default_onSurface / surfaceDialog background
[dialog]dtitleaccent1Dialog title (bold)
[error]_default_foreground / dangerError dialog body
[filehighlight]directoryaccent1Bold
[filehighlight]executablesuccess
[filehighlight]symlink / hardlinkaccent3
[filehighlight]stalelink / coredangerBroken / coredump
[filehighlight]deviceaccent4Bold
[filehighlight]specialwarningSockets / pipes
[filehighlight]archivewarningBold
[filehighlight]docinfoDocuments
[filehighlight]source / databaseaccent2
[filehighlight]media / graphaccent4
[menu] / [popupmenu]_default_onSurface / surface(High)Top menu bar
[menu] / [popupmenu]menuselonAccent1 / accent1Highlighted item
[buttonbar]button / hotkeyforeground / surfaceContainer, accent1F-key bar
[statusbar]_default_foreground / surfaceContainerBottom status line
[editor]editmarkedonAccent1 / accent1Selection
[editor]editframeactiveaccent1Active frame
[editor]editnonprintabledangerControl chars
[diffviewer]added / removed / changedsuccess / danger / infoDiff colours

Bold and other attributes appear after the second ; in MC's fg;bg;attr triple (accent1;;bold for "accent1 on default with bold").

Customising the template

Extract the default template to override it:

tinct plugins templates dump -o mc -l ~/.config/tinct/templates/mc

This creates ~/.config/tinct/templates/mc/tinct.ini.tmpl. Tinct uses your version in preference to the embedded default.

See the templating reference for the available functions and palette accessors — xterm256 is the function that maps a tinct hex colour to its nearest xterm-256 index.

Troubleshooting

MC ignores the skin

MC searches both $XDG_DATA_HOME/mc/skins (default ~/.local/share/mc/skins) and /usr/share/mc/skins. Confirm the file exists at the user path:

ls -l ~/.local/share/mc/skins/tinct.ini

Then either invoke mc -S tinct or check that skin=tinct is under the [Midnight-Commander] section of ~/.config/mc/ini (not under any other section).

Colours look washed out / wrong

MC needs a 256-colour terminal. If you see eight-colour-style output, your terminal isn't advertising 256 colours. Set TERM=xterm-256color (or tmux-256color, etc.) and relaunch MC.

Some elements unthemed

MC's UI has many sections; if you find a section the default template doesn't cover ([input] variations, [shadow], etc.), dump the template (see above) and add the missing block. MC silently uses its default colours for any key the skin omits.

Editor / viewer colours don't update

The internal editor and viewer (mcedit, mcview) inherit from the same skin, but only on launch. Reopen the file in MC after regenerating, or apply the skin live via F9 → Options → Appearance.

  • tmux — multiplexer theming for the surrounding shell.
  • neovim — external editor for users who prefer it over mcedit.
  • ghostty / kitty — terminal emulator themes so MC's surroundings match.