code
code copied to clipboard
Integrated terminal doesn't follow editor color scheme
Current integrated terminal of Code doesn't follow system color scheme. I think this is an important problem to fix because Elementary OS is popular for the consistency and the custom features it provides like prefers-color-scheme
We used to follow the currently selected theme in the Terminal app, but since we changed the way themes are handled there, it no longer updates because it only follows the "custom" scheme.
I think it would make sense to make the Terminal pane follow the same color scheme as the rest of Code so that it's a bit more deterministic. It's not exactly intuitive that a setting in another app would affect this app
I understand.
I am not sure it can be assumed that the user wants the same theme for the terminal as for the sourceview - I prefer a dark theme for Terminal even if using a light theme for Code. (Admittedly I usually use the separate Terminal app rather than the plugin anyway). A quick look at the code indicates the terminal plugin is intended to follow the settings in io.elementary.terminal.settings
including background and foreground colors. However, those do not seem to be updating anymore when Terminal app or System Settings are changes. If you change them manually and restart Code then you can changes the terminal colors to whatever you want. It shouldn't be too hard to have the Terminal follow the theme in io.elementary.code.settings
instead if that is what is desired.
I think because many people have different preferences, we should add an option to follow system color scheme, manually change them, or use the colors from terminal app. I think following the color scheme from another app is unintuitive, though.
Wait, let’s try to clear up some confusion here. This issue mentions a few different things, if I'm reading it right:
Add option to "follow system style" but make it either white or black, and not yellow like it is now. You can set it to either white or black now but then it won't adapt with the system color.
I think you are talking about the editor, right? That is the part that is the solarized light (“yellow”) color right now. I think you are requesting that "follow system style" switches between the white and black theme depending on the system style, and not choose the solarized theme. This is separate from the Terminal window in Code. Correct? Let's call this issue 1.
The terminal is a different theme than the rest of the editor, always dark mode and with different colors. How could we improve this?
Make it follow the system color scheme by default and use elementary color palette.
So you'd want the terminal to be white in the "light" OS mode and dark gray in the "dark" OS mode. Correct? Let's call this issue 2
At the moment, Code follows the Terminal Colors that can be changed in the Terminal app, and @danirabbit was saying that this situation is not very intuitive. I agree; we should allow the user to change the terminal pane's color in Code to be separately set.
Now for the resolutions:
-
I don’t think elementary will want to pick the hard white color scheme instead of the solarized light scheme for its light mode. We use the solarized one in Terminal and in Code, and that is a nice consistent look whcih is friendly. If you want to use the white look, you'll have to switch manually. I think we don't want to add too many preferences here.
-
I think many users will want the editor part of Code to follow the system style, and the Terminal to always be dark, and use the same colors as the Terminal application.
Perhaps we could allow the user to set a preference for the terminal pane similar to the preference for the editor pane?
So you'd have:
-------- Editor pane ---------
Follow system style [ ]
[white] [solarized] [dark]
------- Terminal pane --------
Follow system style [ ]
[white] [solarized] [dark] [custom]
Would that be a workable way forward?
This looks good to me. How would it be implemented in code?