solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色

solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色

solarized

solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色

I was on a call with my co-worker Maria today and she commented on how nice my command prompt in Windows looked. I told it was "Solarized" and then our conference call fell apart as we collected all kinds of fun info about how you can get Solarized in your favorite apps on Windows.

今天我正在与同事Maria通话,她评论了Windows中命令提示符的外观。 我告诉它是“ Solarized”,然后我们的电话会议崩溃了,因为我们收集了有关如何在Windows上喜欢的应用程序中获得Solarized的各种有趣信息。

Solarized is a sixteen color palette (eight monotones, eight accent colors) designed for use with terminal and gui applications. It's by Ethan Schoonover and it's spread all over the web. You can see screenshots and learn about it on GitHub.

Solarized是十六种调色板(八种单调,八种强调色),设计用于终端和GUI应用程序。 它是由Ethan Schoonover创作的,并且已经遍布整个网络。 您可以在GitHub上查看屏幕截图并对其进行了解

针对Windows命令提示符(cmd,powershell,bash)进行了太阳能化 (Solarized for your Windows Command Prompt (cmd, powershell, bash))

By default when you right click and hit properties on a shortcut for a prompt like cmd, powershell, or bash, you'll get a dialog that looks like this.

默认情况下,当您右键单击并单击快捷方式的属性以获取诸如cmd,powershell或bash之类的提示时,您将获得一个如下所示的对话框。

solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色

You'll see there's 16 colors, usually 8 colors on the left, and then the "light/intense/bold" version of each color on the right. I usually used Intense Terminal Green on black before Solarized.

您会看到16种颜色,通常在左侧是8种颜色,然后在右侧是每种颜色的“浅色/深色/粗体”版本。 在晒黑之前,我通常在黑色上使用深绿色终端。

Those values (the defaults) are stored in the registry here HKEY_CURRENT_USER\Console

这些值(默认值)存储在注册表中,此处为HKEY_CURRENT_USER \ Console

solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色

Those defaults are used for NEW shortcuts or consoles that start afresh, via Windows+R. This won't change existing shortcuts you may already have created. There's a few ways to fix this.

这些默认值用于通过Windows + R重新启动的NEW快捷方式或控制台。 这不会更改您可能已经创建的现有快捷方式。 有几种方法可以解决此问题。

I've found the easiest manual way is to recreate the shortcuts. You can do this by just copy-pasting a shortcut and using the new one.

我发现最简单的手动方法是重新创建快捷方式。 您只需复制粘贴快捷方式并使用新的快捷方式即可。

However, there is talk of programmatically updating .lnk (Start Menu link files) with PowerShell.

但是,有人谈论使用PowerShell以编程方式更新.lnk(“开始菜单”链接文件)

You'd just go to the location of each LNK file you want to change, then run Update-Link.ps1 YOURLINK.LNK "light|dark" and it'll load up the .lnk file using Windows APIs and save it with a new Color Table.

您只需转到要更改的每个LNK文件的位置,然后运行Update-Link.ps1 YOURLINK.LNK“ light | dark” ,它将使用Windows API加载.lnk文件并将其保存为新的颜色表。

I've started that work here and I'll PR the main repo if I can solve one issue - I can't get it to switch to Solarized Light, just Dark. It might be something wrong on my side. Please take a look if you're a Win32/PowerShell internals type.

我已经在这里开始了这项工作,如果可以解决一个问题,我将负责主要回购工作-我无法让它切换到Solarized Light,只是Dark 。 在我这方面可能出了点问题。 如果您使用的是Win32 / PowerShell内部类型,查看

Here I went to where the Start Menu stores most of the LNK files. You can also search for an item in your start and right-click "Open File Location."pow

在这里,我转到了“开始”菜单存储大多数LNK文件的位置。 您也可以在开始时搜索项目,然后右键单击“打开文件位置”。

solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色

Here's before and after with my Developer Command Prompt for Visual Studio 2015.

这是我的Visual Studio 2015开发人员命令提示符之前和之后的内容。

solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色

NOTE: Once this is done, in cmd.exe you can also switch between light and dark with "color f6" or "color 01" which is nice for presentations. I'm not sure how to do this yet in PowerShell or Bash.

注意:完成此操作后,您还可以在cmd.exe中使用“ color f6”或“ color 01”在明暗之间切换,这非常适合演示。 我不确定如何在PowerShell或Bash中执行此操作。

Here is the palette after:

以下是调色板:

solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色

For PowerShell there is also an extra-step you'll want to put into your Microsoft.PowerShell_profile.ps1 where you map things like Errors, Progress Bars, and Warnings internally in PowerShell. Be sure to read the instructions.

对于PowerShell,您还需要执行一个额外的步骤,将其放入Microsoft.PowerShell_profile.ps1,在其中您可以在PowerShell中内部映射诸如错误,进度条和警告之类的内容。 请务必阅读说明

在Visual Studio和Visual Studio Code中日晒 (Solarized in Visual Studio and Visual Studio Code)

As for Visual Studio and Visual Studio Code, they're far easier. You can just Ctrl-K then Ctrl-T in VSCode and pick Solarized.

对于Visual Studio和Visual Studio Code,它们要容易得多。 您可以在VSCode中按Ctrl-K,然后按Ctrl-T,然后选择Solarized。

solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色

For Visual Studio (all versions) you can head over to @leddt's GitHub and download settings files for Solarized that you can then import info VS from Tools | Import and Export Settings.

对于Visual Studio(所有版本),您可以转到@leddt的GitHub并下载Solarized的设置文件,然后可以从“工具” |“导入”信息VS。 导入和导出设置。



Sponsor: Big thanks to Raygun! Don't rely on your users to report the problems they experience. Automatically detect, diagnose and understand the root cause of errors, crashes and performance issues in your web and mobile apps. Learn more.

赞助商:非常感谢Raygun ! 不要依靠用户来报告他们遇到的问题。 自动检测,诊断和了解Web和移动应用程序中错误,崩溃和性能问题的根本原因。 了解更多

关于斯科特 (About Scott)

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

斯科特·汉塞尔曼(Scott Hanselman)是前教授,前金融首席架构师,现在是演讲者,顾问,父亲,糖尿病患者和Microsoft员工。 他是一位失败的单口相声漫画家,一个玉米种植者和一本书的作者。

solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色
solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色
solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色
About   关于 Newsletter 时事通讯
Hosting By 主持人
solarized_取得Solarized-VS,VS Code,cmd,PowerShell等的出色命令提示符颜色

翻译自: https://www.hanselman.com/blog/get-solarized-awesome-command-prompt-colors-for-vs-vs-code-cmd-powershell-and-more

solarized