-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Changing the title bar color in accordance with the terminal's background. #3774
Comments
This looks like the inverse of #3310. |
@DHowett Interesting! What if both perferences were added as a boolean option? But also with the ability to change the one left (either the tab or the title bar) to a prefered color. Also, another suggestion is that I think it'd look great if the tabs were (just like in Microsoft Edge) attached to the upper side of the window: |
If we're going to do this, we have to figure out how it works with split panes. For now, it's backlogged and marked as requiring a spec. Thanks! |
The Active pane could set the window background colour - maybe with a short 500ms colour transition animation |
@simioni looks nice! |
#####⚠️ targeting 1.15 ## Summary of the Pull Request Adds support for Themes, a new type of customization for the Terminal. Themes allow the user to customize elements of the Terminal window itself. In this first iteration, this PR adds support for two main properties: * enabling Mica as the window backdrop * changing the tab row color (read: changing the titelbar color) These represent the most important asks of theming in the Terminal. The properties added in this PR are: * Theme color variants: - `"#rrggbb"` or `"#aarrggbb"` - `"accent"` - `"terminalBackground"` * Properties (_listed here in dot notation, but implemented as sub-objects_) - `tabRow.background`: accepts a ThemeColor (above) - `window.applicationTheme`: accepts one of `{"system", "light", "dark"}` - `window.useMica`: accepts a boolean, defaults to false. ## References * As first described in #3327 * spec'd in #12530 ## PR Checklist * [x] Sorta enables #10509, but doesn't close it. That'll need more comprehensive changes to the titlebar code. * **update**: I totally disabled mica, but left the serialization code. It just seems silly without #10509. * [x] Closes #1963 * [x] Closes #3774 * [x] Closes #12939 * [x] Does the bulk of the #3327 work, but I'm going to leave that open since that's become my megathread for everything related to theming. * [x] I work here * [x] Tests added/passed * [ ] Requires documentation to be updated - **SURE DOES** ## Detailed Description of the Pull Request / Additional comments ### --> GO READ #12530 <-- Seriously. These themes aren't customizable in the SUI currently. You can change the active theme, and the UI will show all of the defined themes, but they're not editable there. They don't layer. You'll need to define your own themes. Thay can't come from fragments. This is a really cool future idea, but not implemented in this v0. The sub objects have some gnarly macros to generate a lot of the serialization code for you. ### TODOs * [x] I still have yet to establish what the accent color algorithm is. This might be proprietary and require a ThemeHelpers workaround. * [x] Make sure `terminalBackground` & the SUI result in something sensible * [x] Make sure runtime BG changes work with `terminalBackground`. One time, they didn't. `printf "\x1b]11;rgb:ff/00/ff\x07"` * [x] Acrylic Terminal BG's look weird, like, the opacity is always 50% or something. And the tab row looks all wrong then. ## Validation Steps Performed This is the blob I've been testing with: <details> ```jsonc // "useAcrylicInTabRow": true, "theme": "my dark", // "theme": "Edge", "theme": "orangey", "theme": "WHITE", // "theme": "terminal", "themes": [ { "name": "my dark", "window": { "applicationTheme": "dark", "useMica": true, }, "tabRow": { "background": "#00000000", }, }, { "name": "Edge", "tabRow": { "background": "accent" }, "window": { "applicationTheme": "system" } }, { "name": "orangey", "window": { "applicationTheme": "light", "useMica": true, }, "tabRow": { "background": "#ff8800", }, }, { "name": "WHITE", "window": { "applicationTheme": "dark", "useMica": true, }, "tabRow": { "background": "#FFFFFF", }, }, { "name": "terminal", "window": { "applicationTheme": "dark", "useMica": false, }, "tabRow": { "background": "terminalBackground", }, }, ] ``` </details>
🎉This issue was addressed in #12992, which has now been successfully released as Handy links: |
How to get the desired effect that OP wanted? |
I'd try something like: "theme": "Example",
"themes":
[
{
"name": "Example",
"tabRow":
{
"background": "terminalBackground",
"unfocusedBackground": "terminalBackground"
}
},
] For more details, see: https://learn.microsoft.com/en-us/windows/terminal/customize-settings/themes |
I think it's only available in the preview version. @zadjii-msft |
@isayakmondal Nope, that shipped in 1.16, which is stable now. |
Interesting but it doesn't work for me. Should I share my |
Yep, that's what I'd do |
Write now it's looking like this |
You didn't change the should be "theme": "Example", |
Oh my bad, is there any way to make the tab bar transparent and not translucent? @zadjii-msft |
Not in 1.16, that was only fixed in 1.17, in #13935 |
Got it, any idea when will that be a stable release? @zadjii-msft |
We don't have a timetable at the moment, though, Preview is typically just as stable. I suspect we won't be shipping a new release for a couple of months, we've got some BIG changes in the pipeline that will take a little longer to bake than usual. |
Alright, thank you, keep up the good work. 1.16 would work for me atm. @zadjii-msft |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I am able to get the tab bar to follow the terminal background but, there's a thin line below tab bar which is kind of annoying. |
Description of the new feature/enhancement
It would be great if the backgroud color also applied to the title bar, for example, this is the terminal with a custom background color:
This is how it should look with the added feature (supposing the thick white border issue was fixed as well):
I think the tabs color doesn't look the best either, I don't have any ideas but maybe adding some opacity to them would look better...
Proposed technical implementation details (optional)
The text was updated successfully, but these errors were encountered: