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
Comments
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) |
Would my other suggestion of being able to easily set the colours up be possible? |
@sjetha There is probably a registry file you could use. Otherwise it will be a pain regardless, picking 16 colors. |
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. |
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. |
I change colors by base16-windows-command-prompt, it is not true color but the result is beautiful: |
@jlobos Could you explain how you used 'base16-windows-command-prompt'? I'm not familiar with how that works. |
@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. |
@jlobos Awesome! Thanks a lot. |
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 @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! |
@jlobos reg files didn't change anything for me. any ideas what might be going on? |
Try opening a cmd prompt then running |
If you access the command prompt from a shortcut, I believe the On Tue, Oct 11, 2016 at 1:25 AM, Nick notifications@github.com wrote:
|
@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) |
Greetings, One way to "git 'er done" is the following:
This turns colors off so you can see what is up in the terminal. Regards, Flint |
I get |
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. |
@gravyboat this mostly works now. |
@fpqc Yeah I read through the workarounds and they seem to be sufficient, would just be nice to have an update regarding official support. |
@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). |
@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. :) |
@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 |
@zadjii-msft Thanks for the update! |
@bitcrazed any update on this? Terminal coloring seems to still be a chore even after the creators update |
@xtianus79 @zadjii-msft Responded 6 days ago on this two comments above yours: #880 (comment) |
@gravyboat @bitcrazed @zadjii-msft I am confused... did this make it in the creators update or not.. @mrmckeb comments make it a little unclear |
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. |
@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 |
@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. |
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. |
@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. |
@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. |
@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. 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 ;) |
@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
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. |
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. |
@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. |
@fpqc why would a timeline ruin the surprise. Surprise? |
@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. 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. |
@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 |
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. |
All: Note that we recently shipped a 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. |
@bitcrazed lol you will never understand how hugely important the little things are to a great user experience!!! Thank you. |
How is that Bash does not uses the applied colors when we open it using the Bash on Ubuntu on Windows shortcut? |
@distante This blog post goes into the details. It turns out it's not a simple answer :/ |
Thanks for the link @zadjii-msft I just reboot my Pc and the applied colors are gone too. So sad... |
Can the colors be set from within WSL (by running cmd.exe and the
appropriate commands?). Maybe the easiest solution is to run a script that
sets the colors from a .bashrc file?
…On Fri, Oct 13, 2017, 1:15 PM distante ***@***.***> wrote:
Thanks for the link @zadjii-msft <https://github.com/zadjii-msft>
I just reboot my Pc and the applied colors are gone too. So sad...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#880 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAhrx3oP4T2SpsyD7h0-gkYt6rhcjfcgks5sr8T6gaJpZM4Jjj-0>
.
|
Colortool works just fine on WSL from the windows store for me... just had to restart it. |
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. |
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:
What I actually see is this:
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)
The text was updated successfully, but these errors were encountered: