Skip to content

Commit 23f9f81

Browse files
authored
Merge pull request #5 from waf/use-ini-color-format
Convert to INI colors
2 parents f5a3cb5 + 5e52bb5 commit 23f9f81

File tree

6 files changed

+38
-237
lines changed

6 files changed

+38
-237
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
## Theme Installation
1010

1111
1. [Download and extract](https://raw.githubusercontent.com/waf/dracula-cmd/master/dist/ColorTool.zip) ColorTool. The [source code](https://github.com/Microsoft/console/tree/master/tools/ColorTool) is available from Microsoft.
12-
1. Open cmd.exe and run `ColorTool.exe -b Dracula.itermcolors`. The Dracula.itermcolors file is an iterm theme modified to work for the windows console.
12+
1. Open cmd.exe and run `ColorTool.exe -b Dracula.ini`.
1313
1. Right-click on the window titlebar and choose `Properties`, then on the `Font` tab choose Consolas. Click `OK` to save.
1414
- Note that this step is required, even if your font is already set to Consolas, due to the way that the windows console saves its settings.
1515

1616
Perform the same steps above, but in a powershell window, for powershell support.
1717

1818
## cmd.exe prompt
1919

20-
1. After installing the theme, set the `prompt` environment variable to `$E[0;32;40m→ $E[0;36;40m$p$E[0;35;40m› $E[0;38;40m` to get the prompt in the screenshot.
20+
1. After installing the theme, set the `prompt` environment variable to `$E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m` to get the prompt in the screenshot.
2121
- In the start menu, search for "Edit environment variables for your account."
2222
- Add a new user variable named `prompt` with the above value.
2323

@@ -26,14 +26,23 @@ Perform the same steps above, but in a powershell window, for powershell support
2626
1. Install the 1.0 version of posh-git.
2727
- It's currently prerelease, so you'll need to install it with `Install-Module -Name posh-git -AllowPrerelease -Force`
2828
- If you don't have an `-AllowPrerelease` flag, upgrade PowerShellGet with `Install-Module -Name PowerShellGet -Force` first.
29-
1. Ensure the latest version of PSReadLine is installed. It's installed by default in Windows 10, but you'll most likely [need to upgrade it](https://github.com/lzybkr/PSReadLine#user-content-upgrading).
30-
1. Append the following lines to your [PowerShell $profile file](https://ss64.com/ps/syntax-profile.html):
29+
1. Ensure the latest version of PSReadLine (2.0 or later) is installed. It's installed by default in Windows 10, but you'll most likely [need to upgrade it](https://github.com/lzybkr/PSReadLine#user-content-upgrading).
30+
1. Put the following lines in your [PowerShell $profile file](https://ss64.com/ps/syntax-profile.html):
3131

3232
```powershell
33-
# Dracula PSReadline Configuration
34-
Set-PSReadlineOption -TokenKind Parameter -ForegroundColor Gray
35-
Set-PSReadlineOption -TokenKind Command -ForegroundColor Green
33+
# Dracula readline configuration. Requires version 2.0, if you have 1.2 convert to `Set-PSReadlineOption -TokenType`
34+
Set-PSReadlineOption -Color @{
35+
"Command" = [ConsoleColor]::Green
36+
"Parameter" = [ConsoleColor]::Gray
37+
"Operator" = [ConsoleColor]::Magenta
38+
"Variable" = [ConsoleColor]::White
39+
"String" = [ConsoleColor]::Yellow
40+
"Number" = [ConsoleColor]::Blue
41+
"Type" = [ConsoleColor]::Cyan
42+
"Comment" = [ConsoleColor]::DarkCyan
43+
}
3644
# Dracula Prompt Configuration
45+
Import-Module posh-git
3746
$GitPromptSettings.DefaultPromptPrefix.Text = "$([char]0x2192) " # arrow unicode symbol
3847
$GitPromptSettings.DefaultPromptPrefix.ForegroundColor = [ConsoleColor]::Green
3948
$GitPromptSettings.DefaultPromptPath.ForegroundColor =[ConsoleColor]::Cyan
@@ -53,19 +62,19 @@ There are two possible reasons for this:
5362

5463
1. Step 3 from the theme installation was not followed; it's a requirement for the way that the windows console properties save settings.
5564
1. The shortcut used to apply the theme was different from shortcut used to open the console.
56-
- The windows console stores its font / color settings in per-shortcut. You can see / delete the special cases in the registry, in `\HKEY_CURRENT_USER\Console\` so the defaults are used.
65+
- The windows console stores its font / color settings in per-shortcut. You can see / delete the special cases in the registry. Go to `\HKEY_CURRENT_USER\Console\` and delete the subkeys so the default is used.
5766

5867
### What's that crazy cmd.exe prompt string?
5968

6069
The cmd.exe prompt value can be broken down into the following [ANSI escape sequences](http://ascii-table.com/ansi-escape-sequences.php):
6170

62-
- `$E[0;32;40m` - normal text with a green foreground and black background
71+
- `$E[1;32;40m` - normal text with a green foreground and black background
6372
- `β†’ ` - unicode arrow and space
64-
- `$E[0;36;40m` - normal text with a cyan foreground and black background
73+
- `$E[1;36;40m` - normal text with a cyan foreground and black background
6574
- `$p` - current drive and path. See `prompt /?` output for additional values
66-
- `$E[0;35;40m` - normal text with a magenta foreground and black background
75+
- `$E[1;35;40m` - normal text with a magenta foreground and black background
6776
- `β€Ί ` - unicode chevron and space
68-
- `$E[0;38;40m` - normal text with a default foreground and black background
77+
- `$E[1;37;40m` - normal text with a white foreground and black background
6978

7079
## Team
7180

β€Ždist/ColorTool.zipβ€Ž

-630 Bytes
Binary file not shown.

β€Žimages/screenshot-noblur.pngβ€Ž

-7.12 KB
Loading

β€Žimages/screenshot.pngβ€Ž

-13 KB
Loading

β€Žtheme/Dracula.iniβ€Ž

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[table]
2+
DARK_BLACK = 39,41,53
3+
DARK_BLUE = 189,147,249
4+
DARK_GREEN = 80,250,123
5+
DARK_CYAN = 98,114,164
6+
DARK_RED = 255,85,85
7+
DARK_MAGENTA = 255,121,198
8+
DARK_YELLOW = 255,184,108
9+
DARK_WHITE = 248,248,242
10+
BRIGHT_BLACK = 85,85,85
11+
BRIGHT_BLUE = 189,147,249
12+
BRIGHT_GREEN = 80,250,123
13+
BRIGHT_CYAN = 139,233,253
14+
BRIGHT_RED = 255,85,85
15+
BRIGHT_MAGENTA = 255,121,198
16+
BRIGHT_YELLOW = 241,250,140
17+
BRIGHT_WHITE = 255,255,255

β€Žtheme/Dracula.itermcolorsβ€Ž

Lines changed: 0 additions & 225 deletions
This file was deleted.

0 commit comments

Comments
Β (0)