Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows concfg utility #42

Merged
merged 1 commit into from
May 24, 2018
Merged

Add Windows concfg utility #42

merged 1 commit into from
May 24, 2018

Conversation

tknarr
Copy link
Contributor

@tknarr tknarr commented Apr 15, 2018

Add a template repository for the Windows concfg utility for configuring console and PowerShell window colors in Windows.

@chawyehsu
Copy link
Contributor

chawyehsu commented May 4, 2018

I have question about your color mappings, I personally think that your mapping isn't right.

concfg import https://raw.githubusercontent.com/tknarr/base16-concfg/master/concfg/base16-tomorrow-night.json:

capture

↑ This one comes from your color mappings, most colors display incorrectly.
This is the pshazz settings I used, that git branch prompt (master) should be colored with yellow. But it display white above.


concfg import https://raw.githubusercontent.com/h404bi/base16-concfg/master/presets/base16-tomorrow-night.json:

capture-2

↑This one comes from the concfg base16 template I created, see h404bi/base16-concfg.

@tknarr
Copy link
Contributor Author

tknarr commented May 4, 2018

You may be right. I did the mapping based on the base16 styling guidelines so the results may differ. I'll go back over it and see about making things match the original assignments.

Am I right in thinking that you tried to put colors in a slot where they were similar to the original color?

@tknarr
Copy link
Contributor Author

tknarr commented May 4, 2018

Realized something. Did you look at https://github.com/tknarr/base16-concfg/tree/master/scripts for the syntax-highlighting script that sets PowerShell up to use base16 conventions? It's not obvious that there is one, and it might explain the discrepancy.

It's also present in https://github.com/lukesampson/concfg/tree/master/bin.

@chawyehsu
Copy link
Contributor

chawyehsu commented May 5, 2018

@tknarr Yes, I knew and tried the syntax-highlighting script, it only change the colors of those command typed out (command line), it doesn't change prompt and dircolors, even output like Write-Host, Write-Warning and Write-Error.

Wrong colors:
capture2

Right colors:
capture23

You can see that, all output from Write-Host, Write-Warning and Write-Error are totally messy if I use your concfg theme. Scoop's core coloring functions included.

I think Set-PSReadlineOption is just a tweaks of color mapping on commands. And it has no effect if the color mapping is totally incorrect. And we should consider the whole prompt colors instead just commands colors. We should make sure that the whole prompt colors are correct, after that, use Set-PSReadlineOption to improve the colors of commands, to follow base16 styling guidelines.

FYI, to print out current prompt color mapping, we could execute the snippet:

[enum]::GetValues([System.ConsoleColor]) | Foreach-Object {Write-Host $_ -ForegroundColor $_}

And the color mapping you created doesn't match up the original concfg theme screenshots.

@chawyehsu
Copy link
Contributor

I have improve my base16-concfg repository, now you can take a look at that, and might know the reason of what I talked above. Besides, now I think we are able to 'fix' the issue of concfg.

@chriskempson chriskempson merged commit f7e45f3 into chriskempson:master May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants