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

Application-colored prompt #670

Closed
fbruetting opened this issue Jan 3, 2017 · 19 comments
Closed

Application-colored prompt #670

fbruetting opened this issue Jan 3, 2017 · 19 comments
Labels

Comments

@fbruetting
Copy link

fbruetting commented Jan 3, 2017

Hi and thanks for this wonderful terminal!
If I open Julia in Gnome-Terminal, my prompt gets colored green, if I type ? it gets yellow and if I type ; it gets red. Unfortunately this is not possible in Terminix. Would this be possible to implement? Would be really great! Thanks anyway!

@gnunn1 gnunn1 added the question label Jan 3, 2017
@gnunn1
Copy link
Owner

gnunn1 commented Jan 3, 2017

It should work just fine in Terminix as Terminix uses the same back-end as gnome-terminal. How is this feature configured?

@fbruetting
Copy link
Author

I have no idea, I just use it. :/

@gnunn1
Copy link
Owner

gnunn1 commented Jan 3, 2017

I just tried it here, works fine for me?

screenshot from 2017-01-03 10-45-16

If you type this, and post what you get.

env | grep TERM

Here's what I see in Terminix:

COLORTERM=truecolor
TERMINIX_ID=6ccf7901-ed7f-493b-b3bf-cba2a61af237
TERM=xterm-256color

@fbruetting
Copy link
Author

fbruetting commented Jan 3, 2017

Same for me here, but prompt remains gray (v1.4.2 & Fedora 25):
terminix standard_001

It doesn't work in Gnome Builder, too. But I made no changes to anything. Do you have an idea what to do?

@gnunn1
Copy link
Owner

gnunn1 commented Jan 3, 2017

What theme are you using, does it make any difference if you use Adwaita? Also maybe try a different Terminix text theme as well.

@fbruetting
Copy link
Author

fbruetting commented Jan 3, 2017

Ok, I found out that this is due to the solarized color scheme, sorry! But do you have an idea how I can modify it to adapt this hints? Foreground and background colours are set in this theme, while these are not settable(?) in all other themes.

@gnunn1
Copy link
Owner

gnunn1 commented Jan 3, 2017

There is a check box in the profiles color page labelled "Use system colors" or something similar. If you uncheck it the foreground and background colors will be editable.

@fbruetting
Copy link
Author

fbruetting commented Jan 3, 2017

Some themes have this checked, some don't – and all of them adapt these hints. Checking it with solarized sadly doesn't affect the prompt colour.

@gnunn1
Copy link
Owner

gnunn1 commented Jan 3, 2017

Change the color that I outlined in red in the screenshot below to something yellow and it will work fine. It just happens that the color is the same as the foreground so it doesn't appear to change colors.

screenshot from 2017-01-03 12-02-41

@gnunn1 gnunn1 closed this as completed Jan 3, 2017
@fbruetting
Copy link
Author

fbruetting commented Jan 3, 2017

Both the green (?) and the orange (;) colour have to be modified. Thanks for pointing this behaviour out! I'll file a bug report for Solarized.

@gnunn1
Copy link
Owner

gnunn1 commented Jan 3, 2017

If you want to update the solarized color schemes they are simple JSON files under /usr/share/terminix/schemes, feel free to submit a PR. I did those files a long time ago and I may not have gotten the colors 100% correct.

@bilelmoussaoui
Copy link
Contributor

@gnunn1 What do you think about adding some screenshots of all the supported color schemes to the website?

@gnunn1
Copy link
Owner

gnunn1 commented Jan 3, 2017

@bil-elmoussaoui It would look nice but we'd need to be careful that it doesn't come across as "these are the only themes that can be used". I did a themes page on the web site at https://gnunn1.github.io/terminix-web/manual/themes/ that could be enhanced with screenshots.

@bilelmoussaoui
Copy link
Contributor

I was thinking of a better idea :p we show all the themes possible in terminix-web, once you mouse over the screenshot there's an apply button that will open terminx://jsonpathoftheme and terminix will use xdg-mime in order to get the json file and apply the theme to the user? :P themes can be stored on local directory in order to avoid asking user for root permissions.
This will need some work, but it will be a great feature to add ;)

@fbruetting
Copy link
Author

fbruetting commented Jan 3, 2017

I have the feeling that the Solarized colors are just wrongly ordered. On the left side there are the darker colors and right are the brighter ones – but in Solarized they seem disordered (maybe it's because of the brightness mathematics of Solarized, but I don't really understand console coloring). Could it be that they just need to be reordered? If you compare the colors of the Julia logo dots, you see that the colors of Solarized are different from every other theme. Maybe there's a corrected version out now, if your theme implementation is old?

Julia needs to target the other „green“ or „orange“ color for working right. It targets the brighter version, so maybe the background colors need to be set to the darker colors, whereas the real colors need to be set to the bright ones… if this couses no issues in programs which target the darker colors…?

// Terminix is missing on the GitHub page of Solarized! :p

@phw
Copy link
Contributor

phw commented Jan 3, 2017

I have the feeling that the Solarized colors are just wrongly ordered.

It doesn't look like it is wrong, that's just the way the colors are defined for the Solarized theme. It is exactly the same in Gnome terminal. And the theme is directly taken from https://github.com/altercation/solarized/blob/master/xresources/solarized, where it is defined with the same color ordering, so this can be considered official.

An interesting fact is that the colors on the official solarized theme linked above are slightly off. Maybe they tweaked the colors and this change was never updated in Gnome Terminal (from which the theme was taken for Terminix). For the fun I updated the dark theme locally to use the latest official colors, but I couldn't see a difference even when comparing side by side. If there is interest in having the latest official colors used I can also update the light theme and provide a pull request, but it is hardly worth the effort IMHO.

General rule: If a color theme is not to your liking use another one or adapt the colors ;)

@fbruetting
Copy link
Author

fbruetting commented Jan 3, 2017

Well, there certainly is something wrong, as colors named green and orange are obviously gray. But I don't know how to use them. Should I open a bug report at Solarized?

// As far as I can see, the repo is totally dead. :/

@phw
Copy link
Contributor

phw commented Jan 4, 2017

If you want to know why colors are defined as they are here you definitely would need to ask upstream on Solarized, that's something that cannot be answered here.

It probably comes down to the fact that the Solarized color palette does not provide dark and light variants of the defined accent colors. An alternative to using gray for the light variants would probably have been to just reuse the exactly same color (as it is for example done in the Material or Monokai theme). But it is pointless to discuss this here. Of course Terminix could ship with a changed theme definition, but I wouldn't call it Solarized than.

@phw
Copy link
Contributor

phw commented Jan 4, 2017

There is some discussion about this and an answer on altercation/solarized#8 (comment)

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

4 participants