-
Notifications
You must be signed in to change notification settings - Fork 2k
Customization
This page will explain how you can modify the look and different behaviours of Cmder to your needs.
BTW, You can ✨ contribution to this page too!
📜 Table of contents
-
Shells
-
Cmd/Clink
- Prompt customization (color, text)
- Clink auto answer (e.g. `Terminate batch job (Y/N)?`)
-
Cmd/Clink
-
Window
- Icons – change icon color
-
Terminal emulators
- Hyper with Cmder
- Fluent Terminal – blur behind (i.e. "acrylic" effect)
- Color schemes
- Do not edit the files in the
[cmder_root]\vendor
directory, as they will get overwritten on each Cmder update. - Make sure you update to the latest version of Cmder before applying customizations to your shell.
Cmder can run a variety of different shell profiles (e.g. bash
, cmd
and powershell
).
When you open Cmder, the default cmd shell is displayed.
The shell for cmd
is enhanced by clink
and clink-completions
that are included in your Cmder package.
We will explain how you will be able to change properties such as the prompt text, color, and auto answer behavior.
👉 Note: Clink uses a programming language -- called Lua -- in order to store its configuration files. You can read the manual to learn the syntax, if you are insterested.
The prompt text and color are defined in the the [cmder_root]\vendor\clink.lua
file.
In order to make persistent changes across updates, you'll need to create a new file at the following path:
%cmder_root%\config\my_prompt.lua
For example, if you have nano
text editor installed on your machine, type this to create or open the file:
λ nano %cmder_root%\config\my_prompt.lua
👉 Note: In this example, my_prompt.lua
and my_prompt_filter()
refer to your desired name for file/function name, and can be replaced to any other name following the same naming convention (e.g. super_awesome_config.lua
, etc.)
👉 Tip! The full edition of the Cmder includes nano editor as part of git
for Windows. You can of course also install nano separately, or use a different text editor (such as notepad
) altogether.
Insert (or edit) the following lines:
local cmder_prompt = "\x1b[1;32;40m{cwd} {git}{hg}{svn} \n\x1b[2;37;40m{lamb} \x1b[0m"
local lambda = "λ"
👉 TODO: We assume that you have copied the required functions from the default [cmder_root]\vendor\clink.lua
file. Otherwise, you need to edit the default file for now -- until I wrote a guide for the correct approach to register the custom file.
In your cmder_prompt
variable, remove \n
that comes between {cwd}
and {lamb}
(Hit Ctrl + F → \n
to find it, then remove it.)
Example:
local cmder_prompt = "\x1b[1;32;40m{cwd} {git}{hg}{svn} \x1b[2;37;40m{lamb} \x1b[0m"
local lambda = "λ"
The color is controlled by escape sequences, which is written as ESC [
in the documentation or \x1b[
in our clink.lua
file.
For example, \x1b[1;32;40m{cwd}
will display the path ({cwd}
) in green.
If you change 32
to 36
, you'll get cyan path:
If you change 32
to 33
, you'll get yellow path:
Read this page for a complete list of colors.
For further customization, have a look at this comment.
You can change the lambda λ
to any custom UTF-8 character by modifying the lambda
variable in your lua script.
You can choose a character from the following table:
(Click here to display the table)
TBA.
Then replace it with the default symbol, like this:
local lambda = "★"
👉 Note: Make sure both your terminal emulator (e.g. ConEmu) and your font (e.g. Consolas) can support and display your character.
I recommend using Hyper, Terminus or FluentTerminal as your terminal emulator and either Fira Code, Hasklig or Source Code Pro as your font.
You can configure Cmder to automatically answer Cmd.exe
messages.
The settings file for the shell is located in here:
[cmder_root]\config\settings
For example, if you have nano
text editor installed on your machine, type this to create or open the file:
λ nano %cmder_root%\config\settings
👉 Tip! You can use a different text editor (such as notepad
) instead of nano
.
Method 1: Look for the following subsection:
# name: Auto-answer terminate prompt
# type: enum
# 0 = Disabled
# 1 = Answer 'Y'
# 2 = Answer 'N'
# Automatically answers cmd.exe's 'Terminate batch job (Y/N)?' prompts. 0 =
# disabled, 1 = answer 'Y', 2 = answer 'N'.
terminate_autoanswer = 1
– OR –
Method 2: Enter the following into your Cmder shell:
clink set terminate_autoanswer 1
Which outputs:
Settings 'terminate_autoanswer' set to '1'
👉 Note: Restart Cmder session to take effect.
Source: @edmundo096
See also: #108, #1666 and this stackoverflow post.
This section explains customizations related to the terminal window (e.g. icon, transparency, acrylic blur, etc)
Cmder package includes 6 rainbow-colored icons in addition to the default icon.
The icons are available in the icons
folder:
[cmder_root]\icons\cmder_*.ico
You can choose one for the Cmder shortcut.
To do so, right-click on the shortcut file, from Properties → Shortcut → Change Icon... open and select the new cmder icon.
Cmder is a terminal package that includes ConEmu as the underlying terminal emulator, and different shell profiles.
You can replace ConEmu with different terminal emulators, such as Hyper, Terminus or FluentTerminal.
Hyper is a terminal emulator built with web-technologies such as xterm.js and Electron. Read more…
Fluent Terminal is a terminal emulator built with UWP and xterm.js. It is GPU-accelerated and uses web-technologies.
Here's how the acrylic blurred-behind looks:
This effect is achieved using FluentTerminal integration.
👉 Note: The following color schemes are made for the ConEmu terminal emulator. Other terminal emulators (such as Hyper, Terminus and Fluent Terminal) use different scheme formats.
-
🐼 Panda Syntax Theme for Cmder – 💾 Download
-
More color schemes – 💾 Download
-
Dracula for cmder – 💾 Download