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 support for easily changing colours #880

Closed
fasterinnerlooper opened this issue Aug 13, 2016 · 50 comments
Closed

Add support for easily changing colours #880

fasterinnerlooper opened this issue Aug 13, 2016 · 50 comments
Assignees
Labels
Milestone

Comments

@fasterinnerlooper
Copy link

I have use Linux environments in the past and have always run zsh as my default shell. I don't stick to a specific theme but I thought I'd try some out this time around.

When I use the "agnoster" theme, I'm expecting to see what is shown here:
Agnoster zsh theme
What I actually see is this:
2016-08-12
I understand that this is partially a font issue, but my major concern here is the colours. The deep dark blue is a Windows default for conhost and I seem to be unable change it from the Linux terminal. If I go in and try changing it in conhost it becomes very difficult to get the colours to appear correctly, and sometimes I end up changing the background colour, which can be quite annoying.

Ideally, I would like to have conhost honour dircolors, or have some way of changing the colours easily.

Using Windows 10 Pro 1607 (14393.51)

@fpqc
Copy link

fpqc commented Aug 13, 2016

This is a mix of bash problems and console problems. While (unpatched) conhost does not support 256colors, ConEMU has a dll hook enabling them. However, because bash.exe strips out lots of the color escape sequences, you still can't see them in ConEMU (which uses a hooked conhost)

@fasterinnerlooper
Copy link
Author

Would my other suggestion of being able to easily set the colours up be possible?
Maybe from a file or maybe by making improvements to conhost's colour selection dialog?

@fpqc
Copy link

fpqc commented Aug 13, 2016

@sjetha There is probably a registry file you could use. Otherwise it will be a pain regardless, picking 16 colors.

@deto
Copy link

deto commented Aug 13, 2016

The problem with how conhost sources its colors is that it uses a combination of registry keys, as well as, storing the colors in the shortcut itself. So if you launch cmd.exe (or bash) via a shortcut, that shortcut will get its own set of colors. You have to end up changing them in multiple places, if you launch bash in different ways. Very annoying!

Though apparently adding 256-color support is a feature that was just switched to "In-Progress" in the Feedback hub, so they are working on this.

In the meantime, one thing you can do is install/run a GUI terminal using X11. Currently, I have a VcXsvr (an X11 server) running on startup in Windows, and by adding "export DISPLAY=localhost:0.0" to my .bashrc, I can run xfce4-terminal (after sudo apt-get installing it). Looks great, and has 256 colors.

@fpqc
Copy link

fpqc commented Aug 13, 2016

Yep, I can also suggest the terminal emulator st. If you don't want to configure it, I have a prepatched solarized "fork" on my github page (you would otoh have to do configuration through the config.h header). It uses the font "source code pro for powerline".

Compiling requires just libx11 headers and libxft headers.

@jlobos
Copy link

jlobos commented Aug 15, 2016

I change colors by base16-windows-command-prompt, it is not true color but the result is beautiful:

untitled

@ralphpig
Copy link

@jlobos Could you explain how you used 'base16-windows-command-prompt'? I'm not familiar with how that works.

@jlobos
Copy link

jlobos commented Aug 20, 2016

@ralphpig base16-windows-command-prompt is a list of scripts that edit the Windows registry. In base16-windows-command-prompt/windows-command-prompt/ list of "reg" files, you run one script and registry is update and reopen bash.

@ralphpig
Copy link

@jlobos Awesome! Thanks a lot.

@bitcrazed
Copy link
Contributor

FWIW, we in the console team are dying to be able to make big improvements here. We've a lot on our backlog, but bear with us - we DEFINITELY hear you and want to improve the Console's color capabilities.

@bitcrazed bitcrazed assigned bitcrazed and zadjii-msft and unassigned bitcrazed Aug 26, 2016
@fpqc
Copy link

fpqc commented Aug 26, 2016

@bitcrazed @zadjii-msft I know you guys are pretty busy in the console team, but since you don't have your own github repo, and only relatively small bugfixes relating to WSL have shipped in the Insider builds (at least as far as I have noticed!), I was wondering if maybe you could give us a little roadmap with what you guys are doing.

Like, having participated here, I sort of have an idea of what might be pushed out in the next few Insider builds (upgraded socket implementation, new syscalls relating to things that do currently fail like chroot, better file I/O performance, documenting the secret lxss bus between WSL and the undocunented COM interface on the lxsessionmanager).

Maybe you could just write up a quick and dirty post of what to look for in the console in the months ahead, and let us know when you are updating the console in insider builds (like @russalex does with his WSL changelog)?

Thank you for your time and consideration!

@ghost
Copy link

ghost commented Oct 9, 2016

@jlobos reg files didn't change anything for me. any ideas what might be going on?

@linickx
Copy link

linickx commented Oct 11, 2016

reg files didn't change anything for me. any ideas what might be going on?

Try opening a cmd prompt then running bash.exe instead of using the Bash on Ubuntu on Windows shortcut.

@deto
Copy link

deto commented Oct 11, 2016

If you access the command prompt from a shortcut, I believe the
colors/font/config is all actually stored IN the shortcut itself. So, as
far as I know, you can't modify with a script on registry entries. I think
you might have to manually type in the color hexes.

On Tue, Oct 11, 2016 at 1:25 AM, Nick notifications@github.com wrote:

reg files didn't change anything for me. any ideas what might be going on?

Try opening a cmd prompt then running bash.exe instead of using the Bash
on Ubuntu on Windows
shortcut.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#880 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAhrxw1EP6IkPuAeUMbYnTKrSazgGo_nks5qy0f4gaJpZM4Jjj-0
.

@fpqc
Copy link

fpqc commented Oct 12, 2016

@deto yep Iirc that's how you do it. Unfortunately this is annoying to set up if you like to run cmd or bash or powershell from the runbox (win+r)

@flintiii
Copy link

flintiii commented Dec 15, 2016

Greetings,

One way to "git 'er done" is the following:
bash
invoke a new shell

TERM=xterm-old && powershell

This turns colors off so you can see what is up in the terminal.

Regards,

Flint

@ghost
Copy link

ghost commented Jan 28, 2017

@flintiii

I get powershell: command not found

@gravyboat
Copy link

Hey @bitcrazed any update regarding how this is looking in the backlog? This is a big one for me in terms of usability and eye strain.

@fpqc
Copy link

fpqc commented Apr 12, 2017

@gravyboat this mostly works now.

@gravyboat
Copy link

@fpqc Yeah I read through the workarounds and they seem to be sufficient, would just be nice to have an update regarding official support.

@mrmckeb
Copy link

mrmckeb commented Apr 15, 2017

@gravyboat It looks like the way to change colours is to use a shortcut, for the time. I'm also hoping they add some more advanced theming mechanism in future.

On a side note, I'm very happy that the team have added enhanced colour support in the Creators Update, and a heap of other cool stuff that's making my life easier (I work with JavaScript).

@gravyboat
Copy link

gravyboat commented Apr 15, 2017

@mrmckeb Definitely. I saw the registry changes and some of the other suggested workarounds and they seem good, I figure other people are going to stumble on this via Google so I might as well ask so others don't have to. :)

@zadjii-msft
Copy link
Member

@gravyboat For the time being, improving this UX unfortunately didn't make the cut :( Don't worry though, it's still a pain point that we're very aware of that we'd love to get to Soontm

@gravyboat
Copy link

@zadjii-msft Thanks for the update!

@xtianus79
Copy link

@bitcrazed any update on this? Terminal coloring seems to still be a chore even after the creators update

@gravyboat
Copy link

@xtianus79 @zadjii-msft Responded 6 days ago on this two comments above yours: #880 (comment)

@xtianus79
Copy link

@gravyboat @bitcrazed @zadjii-msft I am confused... did this make it in the creators update or not..

@mrmckeb comments make it a little unclear

@zadjii-msft
Copy link
Member

@xtianus79

For the time being, improving this UX unfortunately didn't make the cut

It's not in Creator's update, it hasn't made the cut for the release that will follow Creator's Update, and that's as much about the timeline as I know.

@xtianus79
Copy link

xtianus79 commented Apr 24, 2017

@zadjii-msft thanks for the reply. This is not your fault but as a developer that has moved away from microsoft tooling (but loves vs code) it is upsetting that these types of things aren't priority for the team. Internet explorer / Edge Developer tools are an exact replica of this. Someone on the msft teams needs to have more priority towards these types of things.

One of the reasons I almost went over to just using a mac full time was how much of an ease it was to develop on it with all of the linuxy functionality and terminalness. Now, linux is much better on Windows 10 but the cmd is atrocious to use or work with.

Just being honest

@fpqc
Copy link

fpqc commented Apr 24, 2017

@xtianus79 you could probably write like a tiny program with a UI that lets you pick those colors and then writes a registry entry in like visual basic or something, or even do it as a website that builds the desired .reg file (such things already exist for Linux btw).

The upshot here is that miniksa said that they were planning on rolling out a new console API possibly in the RS3 release cycle. If that's the case, programs like conemu will be able to plug directly into the API rather than rely on undocumented hacks like they do now, and you won't need to necessarily use the regular built-in console if you don't like its interface.

@hungys
Copy link

hungys commented Apr 25, 2017

It would be great if Microsoft can release a roadmap for WSL & console improvement.

At this time, I tend to use Cmder instead of the built-in console, mainly because of color rendering.

@xtianus79
Copy link

@fpqc I can use Cmder or Hyper... I am not liking hyper it is wonky. I don't want to write something I want to use a native working bash cmd terminal that is representative of the 21st century.

@fpqc
Copy link

fpqc commented Apr 25, 2017

@xtianus79 Cmder uses exactly the same hacks as ConEmu. Lots of the bugs and glitches with WSL in cmder and ConEmu arise from weird hacks they use to scan and scrape hidden actively-running console windows. When there is a proper API for third-party consoles/terminals to use, most, if not all, of these problems will disappear.

@zadjii-msft zadjii-msft added this to the Backlog milestone Apr 25, 2017
@zadjii-msft
Copy link
Member

@hungys I would really love to know what in particular about the color rendering you're unhappy with.

As it stands right now, we do support the full RGB spectrum of VT sequences, so you can have any color you want in the terminal.

If it comes down to customizing the color pallet, I understand that is very frustrating UX.
image
This dialog box is just hard to use, I get frustrated with it on a daily basis. That being said, we had to make some other behind-the-scenes improvements this cycle, and we weren't able to get that dialog above the cut line. It's not like we're not ignoring it. There just so happen to be other priorities above it.

As @fpqc has mentioned, we're working on a new console "API" (let's call it that) that will make your life a lot easier. But as it stands, I don't believe that's in the RS3 timeframe either. More behind the scenes work needed to get done.

I think if we released a roadmap, that would ruin the surprise ;)

@hungys
Copy link

hungys commented Apr 26, 2017

@zadjii-msft Thanks for the reply. Actually, what frustrates me the most is the same thing as OP said: the color is not rendered well on the built-in console. I'm also a user who use zsh with agnoster theme LOL


(Windows Console/Cmder/iTerm2 on macOS)

agnoster theme works not bad with Cmder on Anniversary Update, but there're some glitches regarded to the position of the cursor on Creators Update (cmderdev/cmder#1350), and I'm not sure if it's Cmder's bug or due to the change of Creators Update.

@fpqc
Copy link

fpqc commented Apr 26, 2017

hungys, oh, that's simple. The console doesn't support fallback fonts yet. That's something that's been mentioned. I don't know if it will make it in for RS3 but that's a known issue that can be handled by using a prepatched font.

@hungys
Copy link

hungys commented Apr 26, 2017

@fpqc Thanks. Except for the font issue , I think color rendering is also an important issue. Take zsh's "agnoster" for example, the actual color rendered by Windows Console is very weird (see the blue and green) compared to how Cmder, iTerm2, and even the integrated terminal of VS Code did.

@xtianus79
Copy link

@fpqc why would a timeline ruin the surprise. Surprise?

@zadjii-msft
Copy link
Member

@hungys It's not that the color rendereing is wrong, it's just that our default color palette is worse, and it's hard to change the palette.

image

image

If you do go through the pain of changing it though, you can have it look pretty just like you can make any other terminal.

@hungys
Copy link

hungys commented Apr 26, 2017

@zadjii-msft Thanks for the explanation! I think I misunderstood it and also forgot that I've been changed the color settings for iTerm2 :p

@vhanla
Copy link

vhanla commented Aug 7, 2017

I'm writing a tool to edit colors in registry as well in shortcut files. Currently still in early stages, so you might want to give a try and report bugs and feature requests.
https://github.com/vhanla/ConsoleColor

@bitcrazed
Copy link
Contributor

All: Note that we recently shipped a colortool to help you manage your Consoles' color schemes: https://blogs.msdn.microsoft.com/commandline/2017/08/11/introducing-the-windows-console-colortool/

Not that this is a stepping-stone towards more sane & modern color palette configuration. Do let us know what you think of it over on the repo.

image

@xtianus79
Copy link

@bitcrazed lol you will never understand how hugely important the little things are to a great user experience!!! Thank you.

@distante
Copy link

How is that Bash does not uses the applied colors when we open it using the Bash on Ubuntu on Windows shortcut?

@zadjii-msft
Copy link
Member

@distante This blog post goes into the details. It turns out it's not a simple answer :/

@distante
Copy link

Thanks for the link @zadjii-msft

I just reboot my Pc and the applied colors are gone too. So sad...

@deto
Copy link

deto commented Oct 13, 2017 via email

@zadjii-msft
Copy link
Member

@deto Unfortunately, due to the way interop works, colortool doesn't work in WSL. I really really wish it did, but it's not really possible. I've discussed this more at length here

@erikbra
Copy link

erikbra commented Nov 3, 2017

Colortool works just fine on WSL from the windows store for me... just had to restart it.

@bitcrazed
Copy link
Contributor

Thanks for the discussion. Closing as I think the Console now supports what the OP requested. If you have further issues/asks, please file issues on our Console GitHub Repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests