Skip to content

moekhalil/powershell

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dracula for the PowerShell Console

A dark theme for the Windows 10 Console, supports both PowerShell and cmd.exe.

Screenshot

git integration is available only in powershell via posh-git

Installation

There are 4 parts to configure; all of them are optional:

Colors Installation

  1. Download and unzip ColorTool. The source code is available from Microsoft.
  2. Open PowerShell, navigate to unzipped ColorTool directory, and run install.cmd.
  3. Right-click on the window titlebar and choose Properties, then on the Font tab choose Consolas. Click OK to save.
    • 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.

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

PowerShell Prompt

  1. Install the 1.0 version of posh-git.
    • It's currently prerelease, so you'll need to install it with Install-Module -Name posh-git -AllowPrerelease -Force
    • If you don't have an -AllowPrerelease flag, upgrade PowerShellGet with Install-Module -Name PowerShellGet -Force first.
  2. 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.
    • You can verify that 2.0 was installed by running (Get-Module PSReadLine).Version. If the installation does not appear to work, please see this issue in PSReadLine
  3. Include this powershell configuration in your PowerShell $profile file.1

CMD.exe Prompt

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

Windows Titlebar Color

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

Support for other terminals

This repo also contains a theme for the new Windows Terminal from Microsoft, as well as a theme for ConEmu. An alternate version of the ConEmu theme is available at dracula/conemu.

Frequently Asked Questions

What's the PowerShell $profile file?
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.
After applying the theme, other consoles don't always have the right colors.
There are two possible reasons for this:
  1. Step 3 from the theme installation was not followed; it's a requirement for the way that the windows console properties save settings.
  2. The shortcut used to apply the theme was different from shortcut used to open the console.
    • 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.
What's that crazy cmd.exe prompt string?
The cmd.exe prompt value can be broken down into the following ANSI escape sequences:
  • E[1;32;40m - normal text with a green foreground and black background
  • - unicode arrow and space
  • $E[1;36;40m - normal text with a cyan foreground and black background
  • $p - current drive and path. See prompt /? output for additional values
  • $E[1;35;40m - normal text with a magenta foreground and black background
  • - unicode chevron and space
  • $E[1;37;40m - normal text with a white foreground and black background

Uninstallation

  1. Uninstall the colors:
    • Download and unzip the same archive you used to install the theme.
    • Run uninstall.cmd
  2. Uninstall the prompts:
    • PowerShell prompt: remove the configuration from your powershell $profile.
    • CMD.exe prompt: delete the prompt environment variable.

Team

This theme is maintained by the following person(s) and a bunch of awesome contributors.

Will Fuqua Zeno Rocha
Will Fuqua Zeno Rocha

Contributors

Tim Kilåker - Contributed an updated release of ColorTool.exe.

License

MIT License

About

Dracula theme for the PowerShell and cmd.exe

Resources

License

Stars

Watchers

Forks

Releases

No releases published