Git Product home page Git Product logo

powershell's Introduction

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

See our installation instructions here.

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.

Community

  • Twitter - Best for getting updates about themes and new stuff.
  • GitHub - Best for asking questions and discussing issues.
  • Discord - Best for hanging out with the community.

License

MIT License

powershell's People

Contributors

hisssy avatar waf avatar zenorocha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powershell's Issues

Theme takes twice (and then some) to load on PowerShell Core 7 than it takes on Windows PowerShell 5

Description of the issue

When loading the Dracula Theme in PowerShell 5, it usually takes about ~500ms. When loading the Dracula Them in PowerShell 7, it usually takes about ~1200ms.

Screenshots
PowerShell 5

image

PowerShell 7

image

Version Information

Please provide the output of this PowerShell command: (Get-Module PSReadline).Version; (Get-Module posh-git).Version

PowerShell 5

› (Get-Module PSReadline).Version; (Get-Module posh-git).Version

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      0      -1
1      0      0      -1

PowerShell 7

› (Get-Module PSReadline).Version; (Get-Module posh-git).Version

Major  Minor  Build  Revision
-----  -----  -----  --------
2      1      0      -1
1      0      0      -1

Git Branching

How can i add the git branching to the prompt in CMD.exe ?

Help to Configure

Description of the issue

Can someone make a video of teaching? I followed all the steps but I can't make it look like the sample image in readme.md.

Screenshots

Me:
image

As i want:
image

Version Information

image

Wrong colors

Hello, after installation I get the wrong colors. Could you help me, please?
image
The command line works fine, but not powershell.
image

Colours not working

I've tried to get the colours working but all I get is this:
image

Is there some settings I'm missing?

Crazy string powershell

Description of the issue

When I try to open PowerShell I have this crazy String sequence, but on CMD seems to work fine

Screenshots

https://prnt.sc/wm15xu

Version Information

(Get-Module PSReadline).Version; (Get-Module posh-git).Version

Major  Minor  Build  Revision
-----  -----  -----  ------
2      0      0      -1
1      0      0      -1
1      0      0      -1

Colors Errors

When I apply this theme, it looks like this:

screenshot_1

my $PROFILE

# Ensure that Get-ChildItemColor is loaded
Import-Module Get-ChildItemColor

# Set l and ls alias to use the new Get-ChildItemColor cmdlets
Set-Alias l Get-ChildItemColor -Option AllScope
Set-Alias ls Get-ChildItemColorFormatWide -Option AllScope

# Helper function to show Unicode characters
function U
{
    param
    (
        [int] $Code
    )
 
    if ((0 -le $Code) -and ($Code -le 0xFFFF))
    {
        return [char] $Code
    }
 
    if ((0x10000 -le $Code) -and ($Code -le 0x10FFFF))
    {
        return [char]::ConvertFromUtf32($Code)
    }
 
    throw "Invalid character code $Code"
}

# Ensure posh-git is loaded
Import-Module -Name posh-git

# Dracula readline configuration. Requires version 2.0, if you have 1.2 convert to `Set-PSReadlineOption -TokenType`
Set-PSReadlineOption -Color @{
    "Command" = [ConsoleColor]::Green
    "Parameter" = [ConsoleColor]::Gray
    "Operator" = [ConsoleColor]::Magenta
    "Variable" = [ConsoleColor]::White
    "String" = [ConsoleColor]::Yellow
    "Number" = [ConsoleColor]::Blue
    "Type" = [ConsoleColor]::Cyan
    "Comment" = [ConsoleColor]::DarkCyan
}
# Dracula Prompt Configuration
Import-Module posh-git
$GitPromptSettings.DefaultPromptPrefix.Text = "$([char]0x2192) " # arrow unicode symbol
$GitPromptSettings.DefaultPromptPrefix.ForegroundColor = [ConsoleColor]::Green
$GitPromptSettings.DefaultPromptPath.ForegroundColor =[ConsoleColor]::Cyan
$GitPromptSettings.DefaultPromptSuffix.Text = "$([char]0x203A) " # chevron unicode symbol
$GitPromptSettings.DefaultPromptSuffix.ForegroundColor = [ConsoleColor]::Magenta
# Dracula Git Status Configuration
$GitPromptSettings.BeforeStatus.ForegroundColor = [ConsoleColor]::Blue
$GitPromptSettings.BranchColor.ForegroundColor = [ConsoleColor]::Blue
$GitPromptSettings.AfterStatus.ForegroundColor = [ConsoleColor]::Blue

# Ensure oh-my-posh is loaded
Import-Module -Name oh-my-posh

# Set the default prompt theme
Set-Theme agnoster

Wrong background color

If you're reporting an UI issue, make sure you take a screenshot that shows the actual bug.

I am following pari passu the instructions in README.md to install Dracula theme on PoSh. When I execute install.cmd, however, my terminal is abhorrently pink:

Anotação 2019-12-01 072846

Even when I open a new terminal, its background color is pink. When I go to Properties page and select the right black color tone, all works as expected.

I'm on Windows 10 v1909 running PowerShell 5.1 Build 18362 Rev. 145

CTRL + C stopped working? Am I the only one?

After applying this theme, ctrl + C stopped working while inside powershell and cmd.
I did everything in order from "Colors Installation -> PowerShell Prompt -> CMD.exe Prompt -> Windows Titlebar Color"...

No error encountered during installation...

When CMD or Powershell is opened, without typing anything CTRL + C works fine, but when running an console application, ctrl + c does not exit the app...

Tried on:

  1. Windows Explorer -> Open Windows Powershell
  2. Windows Explorer -> Open Windows Powershell as Admin
  3. Windows button (right click) -> Windows Powershell
  4. Windows button (right click) -> Windows Powershell as Admin
  5. Windows Search -> Windows Powershell
  6. Windows Search -> Windows Powershell as admin
  7. Windows Search -> CMD
  8. Windows Search -> CMD as admin
  9. VSCode -> Intergrated Terminal (Powershell)
  10. VSCode -> Intergrated Terminal (CMD)

In all cases, ctrl + c does not work

Colours are not what were shown in the front page

I ran the exact instructions to install the colour profile but it seems the colours are different from the one in the image above the instructions... I'd be happy to manually implement each of the colour values by hand if someone were to tell them to me!
image

❯ not appearing showing

Description of the issue

as you can see in the screen shot the ❯ icon is not appearing

Screenshots
image

If applicable, please provide a screenshot of the issue

Version Information
image

Please provide the output of this PowerShell command: (Get-Module PSReadline).Version; (Get-Module posh-git).Version

Install issues

I got install issues, here are my steps
This worked
PS C:\Users\Owner\ColorTool> ./install.cmd

NuGet installed successfully
PS C:\Windows\system32> Install-Module -Name NuGet

But then
PS C:\Windows\system32> Install-Module -Name PowerShellGet -Force
The error
PackageManagement\Install-Package : The module PowerShellGet cannot be installed because the catalog signature in PowerShellGet.cat does not match the hash generated from the module.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
$null = PackageManagement\Install-Package @PSBoundParameters
CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
Exception
+ FullyQualifiedErrorId : InvalidCatalogSignature,ValidateAndGet-AuthenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Some characters are showing up as squares with ? inside them

Description of the issue
After installing it, everything went smooth, very beautiful color scheme, but then I got using PowerShell and some unicode(I'm guessing) characters are showing as squares with question marks inside of them

Screenshots
Untitled

Version Information

Untitled2

Could not find or load "Dracula.ini"

When I run .\ColorTool.exe -b Dracula.ini in powershell console I get the error saying it can't find or load Dracula.ini

image

Am I doing something wrong? I don't see a Dracula.ini file in the ColorTools folder. Is this a file that gets created?

Not show color

after installing and following the steps, everything works normally, but when you restart the console, it turns white again, with only the background with the theme color

Background color problem

Sir, I have followed all the instructions and installed the theme. But the background colour of PowerShell didn't change.
Screenshot (294)

Replace home path with ~ in prompt

Hi guys. Loving the theme. This is more of a question than an issue, but I wasn't sure where to ask.

In your screenshots you've replaced your home path (C:\Users...) with a tilde character ~, which is how I'd like my prompt to work as well.

Mine keeps showing the full path - not sure if based on your installation instructions it should show the tilde or if I need to do something else. Any help would be much appreciated!

Cannot change windows title after loading $profile

Hi Guys, Thank you for making this beautiful dracula theme for powershell,
the console works just fine.
But, after loading the $profile, it seems that it cannot change the window title
even after I add this config to the $profile it also doesn't change

$Host.UI.RawUI.WindowTitle = "Window Title"

ps_dracula issue

Uninstalling

Can someone please help me with uninstalling this?
I ran uninstall.cmd but I cannot figure out how to exactly delete the environment variable profile in cmd.

Please help.

Unable to change prompt

During my setup, I set my prompt environment variable to $E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m, as specified in the setup instructions. I decided that I don't like the arrow, so I deleted the environment variable, but my prompt did not revert to the old style. I also tried fully uninstalling the theme through the uninstall script and reinstalling - that didn't work either. Now I've re-added the prompt environment variable with a different value, but my prompt still will not change - it seems to be stuck as the initial value I first set it to.

Any ideas on how to fix this?

The property xyz cannot be found on this object.

Description of the issue
Hello, I followed the instructions from https://draculatheme.com/powershell and after posting my Dracula configuration into $profile colors seem to look fine but the errors appear.

Screenshots
https://prnt.sc/whcvma

Version Information

v1.0 > (Get-Module PSReadline).Version; (Get-Module posh-git).Version

Major Minor Build Revision


2 2 0 -1
0 7 3 -1

also I'm adding my powershell configuration (had to copy it and change it to txt because Github doesn't support that kind of file formats.
Microsoft.PowerShell_profile.txt

Titlebar color

Capturar

Hi guys, thanks for this theme, on your screenshots your titlebar color changes too, but mine didn't change. How can I change it?

The property 'ForegroundColor' cannot be found on this object. Verify that the property exists and can be set. At C:\Users\grzeg\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:16 char:1

Help me fix this...
The property 'Text' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\grzeg\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:14 char:50

  • $GitPromptSettings.DefaultPromptPrefix.Text = "$([char]0x2192) " # ar ...
  •                                              ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'ForegroundColor' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\grzeg\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:15 char:1

  • $GitPromptSettings.DefaultPromptPrefix.ForegroundColor = [ConsoleColo ...
  •   + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : PropertyAssignmentException
    
    

The property 'ForegroundColor' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\grzeg\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:16 char:1

  • $GitPromptSettings.DefaultPromptPath.ForegroundColor =[ConsoleColor]: ...
  •   + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : PropertyAssignmentException
    
    

The property 'Text' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\grzeg\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:17 char:50

  • $GitPromptSettings.DefaultPromptSuffix.Text = "$([char]0x203A) " # ch ...
  •                                              ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'ForegroundColor' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\grzeg\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:18 char:1

  • $GitPromptSettings.DefaultPromptSuffix.ForegroundColor = [ConsoleColo ...
  •   + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : PropertyAssignmentException
    
    

The property 'ForegroundColor' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\grzeg\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:20 char:1

  • $GitPromptSettings.BeforeStatus.ForegroundColor = [ConsoleColor]::Blu ...
  •   + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : PropertyNotFound
    
    

The property 'ForegroundColor' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\grzeg\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:21 char:1

  • $GitPromptSettings.BranchColor.ForegroundColor = [ConsoleColor]::Blue
  •   + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : PropertyNotFound
    
    

The property 'ForegroundColor' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\grzeg\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:22 char:1

  • $GitPromptSettings.AfterStatus.ForegroundColor = [ConsoleColor]::Blue
  •   + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : PropertyNotFound
    
    

error

Colors not loading from profile configuration

Annotation 2019-08-17 015813

I followed the install instructions and this is the error I get. I tried -TokenType instead, but I get the same error for this parameter as well.

The Microsoft.PowerShell_profile.ps1 file contents are just the Dracula config, nothing else.

I will appreciate your help with this because I don't see what I'm doing wrong. Thank you.

Powershell?

Thanks for the theme! Is there any way to apply this to powershell too?

[Question] Home dir ~ symbol on cmd theme

So this is kind of a question rather than an issue but, is it possible to have the ~ (Tilda, home symbol) (like on Linux) instead of C:\Users\username on the cmd theme?

Wrong symbols for CMD.exe on draculatheme.com

Description of the issue

When copying the prompt from draculatheme.com/powershell, the symbols on the prompt are not displayed correctly. It looks like they somehow are converted when creating the website, because symbols on the Github site are correct.

Screenshots

dracula_powershell_prompt

dracula_powershell_website

dracula_powershell_github

Version Information

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      0      -1

Sitenote

draculatheme.com/powershell has some stray </p> in it as can be seen on the screenshot above.

Issue when running prompt

Description of the issue

I followed all of the instructions, but when I try to set the environment variable prompt, I get this error:

At line:1 char:5
+ $E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m
+     ~
Missing ']' after array index expression.
At line:1 char:18
+ $E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m
+                  ~
Missing ']' after array index expression.
At line:1 char:44
+ $E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m
+                                            ~
Missing ']' after array index expression.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingEndSquareBracket

Screenshots
2022-06-29 19_54_55-Windows PowerShell

Version Information

Please provide the output of this PowerShell command: (Get-Module PSReadline).Version; (Get-Module posh-git).Version

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      0      -1

git command could not be found

I get this warning in powershell after doing all the installation steps: "git command could not be found. Please create an alias or add it to your PATH."

Newbie Question?

Hi there, i'm pretty new to using the command line so I probably am making a bunch of rookie mistakes, but I can't for the life of me figure out how to run the ColorTool.exe -b Dracula.ini line in Powershell. I've attached a really embarrassing screenshot of my sad attempts at getting it to work haha. The directory I cd'd into is the unzipped version of the ColorTool file.
2020-07-05 18_46_25-Executing an EXE file using a PowerShell script - Stack Overflow

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.