Skip to content

Commit 1e97464

Browse files
committed
add uninstall support
This is a bit tricky, because Windows stores color configuration in both a hierarchical registry format, as well as in each shortcut (.lnk) file. This should cover the "default setup" for most people, but it won't handle the cases where users have their own shortcuts set up. I don't think there's a way to handle this last scenario except for searching the hard drive for all .lnk files, which is out-of-scope for this project.
1 parent ec26654 commit 1e97464

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
<p align="center"><i>git integration is available only in powershell via posh-git</i></p>
88

9-
## Theme Installation
9+
## Installation
10+
11+
There are 4 parts to configure: the colors, the powershell prompt, the cmd.exe prompt, and the titlebar color. All of these are optional.
12+
13+
**Colors Installation**
1014

1115
1. [Download and unzip](https://raw.githubusercontent.com/waf/dracula-cmd/master/dist/ColorTool.zip) ColorTool. The [source code](https://github.com/Microsoft/Terminal/tree/master/src/tools/ColorTool) is available from Microsoft.
1216
1. Open PowerShell, navigate to unzipped `ColorTool` directory, and run `install.cmd`.
@@ -15,37 +19,37 @@
1519

1620
For cmd.exe support, perform the same steps above but in a cmd.exe window.
1721

18-
## PowerShell prompt
22+
**PowerShell prompt**
1923

2024
1. Install the 1.0 version of posh-git.
2125
- It's currently prerelease, so you'll need to install it with `Install-Module -Name posh-git -AllowPrerelease -Force`
2226
- If you don't have an `-AllowPrerelease` flag, upgrade PowerShellGet with `Install-Module -Name PowerShellGet -Force` first.
2327
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).
2428
1. Include [this powershell configuration](https://github.com/dracula/powershell/blob/master/theme/dracula-prompt-configuration.ps1) in your PowerShell `$profile` file.<sup>[1](#whats-the-powershell-profile-file "What's the PowerShell `$profile` file?")</sup>
2529

26-
## cmd.exe prompt
30+
**cmd.exe prompt**
2731

2832
Set the environment variable `prompt` to `$E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m`
2933

30-
## Titlebar color
34+
**Titlebar color**
3135

3236
In Windows 10, the titlebar color can be set system-wide in Settings → Personalization → Colors → Custom color → More → #262835.
3337

3438
## Frequently Asked Questions
3539

36-
### What's the PowerShell `$profile` file?
40+
**What's the PowerShell `$profile` file?**
3741

3842
This is a PowerShell file that's run when a PowerShell session is started, similar to a `.bashrc`. Type `$profile` in a PowerShell window to see the path. See https://ss64.com/ps/syntax-profile.html for more detail.
3943

40-
### After applying the theme, other consoles don't always have the right colors.
44+
**After applying the theme, other consoles don't always have the right colors.**
4145

4246
There are two possible reasons for this:
4347

4448
1. Step 3 from the theme installation was not followed; it's a requirement for the way that the windows console properties save settings.
4549
1. The shortcut used to apply the theme was different from shortcut used to open the console.
4650
- 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 values in the `Console` key are used.
4751

48-
### What's that crazy cmd.exe prompt string?
52+
**What's that crazy cmd.exe prompt string?**
4953

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

@@ -57,6 +61,15 @@ The cmd.exe prompt value can be broken down into the following [ANSI escape sequ
5761
- `` - unicode chevron and space
5862
- `$E[1;37;40m` - normal text with a white foreground and black background
5963

64+
## Uninstallation
65+
66+
1. Uninstall the colors:
67+
- Download and unzip [the same archive](https://raw.githubusercontent.com/waf/dracula-cmd/master/dist/ColorTool.zip) you used to install the theme.
68+
- Run uninstall.cmd
69+
1. Uninstall the prompts:
70+
- Remove the configuration from your powershell `$profile`.
71+
- Delete the `prompt` environment variable.
72+
6073
## Team
6174

6275
This theme is maintained by the following person(s) and a bunch of [awesome contributors](https://github.com/dracula/powershell/graphs/contributors).

dist/ColorTool.zip

4.26 KB
Binary file not shown.

0 commit comments

Comments
 (0)