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

Automatic dark/light theme switching according to OS #6491

Closed
xmha97 opened this issue Jun 13, 2020 · 24 comments
Closed

Automatic dark/light theme switching according to OS #6491

xmha97 opened this issue Jun 13, 2020 · 24 comments
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@xmha97
Copy link

xmha97 commented Jun 13, 2020

Hello,
Please add below feature:

  • Automatic dark/light theme switching according to OS

In VSCode I can enable this feature using:

window.autoDetectColorScheme

image

Idea for Windows Terminal:
image

@xmha97 xmha97 added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jun 13, 2020
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 13, 2020
@j4james
Copy link
Collaborator

j4james commented Jun 13, 2020

I think this is a duplicate of #1230.

@xmha97
Copy link
Author

xmha97 commented Jun 13, 2020

I think this is a duplicate of #1230.

No, My issue isn't about a bug. It is about a new feature.

@beviu
Copy link
Contributor

beviu commented Jun 13, 2020

If you set "theme" in the config file to "system", it's supposed to work, but right now I think it doesn't work because of that bug.

@DHowett
Copy link
Member

DHowett commented Jun 13, 2020

So, this needs #1230 to work properly but it isn’t 1230 alone. There’s also a request that the colorScheme be theme switchable :)

@j4james
Copy link
Collaborator

j4james commented Jun 13, 2020

Ah, OK. I get it now. That's a neat idea. But do you not then need some way to specify your preferred light color scheme (or vice versa)? Or does it auto detect it based on the name?

@DHowett
Copy link
Member

DHowett commented Jun 13, 2020

Yeah, that’s a good question :) Probably warrants at least a mini-spec. There’s also a request for focused/unfocused configuration, so I am a bit concerned about adding another dimension to the config matrix.

@cscorley
Copy link

The VS Code implementation in the example has up to four "colorScheme" specifications:

image

It is a bit verbose, but is much more flexible than requiring a scheme to define both a dark and a light (or high contrast!) variant. For example, I like Dracula at night but it does not define a light variant, so I use Quiet Light during the day.

@DHowett DHowett added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels Jun 19, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 19, 2020
@DHowett DHowett added this to the Terminal Backlog milestone Jun 19, 2020
@DHowett DHowett added Help Wanted We encourage anyone to jump in on these. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 19, 2020
@mateuszdrab
Copy link

Is there a reason why the terminal's title bar does not inherit the Windows accent color where all the other windows do?

Guess this is due to the fact that it's some custom code handling the title bar rendering due to tabs.

@TBBle
Copy link

TBBle commented Jun 24, 2020

Title Bar colouring is also what I think @DHowett was referring to earlier, probably #4862, which links through to microsoft/microsoft-ui-xaml#1332.

To throw another axis into the mix, I'd like to be able to use a different colour scheme when running as admin. I have PowerShell (Core) configured to use Solarised Light when elevated instead of Solarised Dark as I normally use.

Although after learning about it from this ticket, I set up VSCode to use Solarized Light/Dark per the OS theme, so maybe I should find a different way of reminding myself when I'm elevated.

Edit: To be clear, I'm talking about if the whole WT process is running elevated, not trying to mix this in with the 'elevated tabs' request. Currently PowerShell Core under conhost ends up ignoring my admin-based colour switch when it draws a cell with text input or Control-L, so if the switch was handled at the WT level and applied the WT colourschemes, it'd work better than it does now, I think.

@mateuszdrab

This comment has been minimized.

@DHowett

This comment has been minimized.

@ChristAlbert
Copy link

Isn't this a duplicate of #4066?

@zadjii-msft
Copy link
Member

@ChristAlbert good find! It totally is. Thanks for digging that out of our backlog!

/dup #4066

@zadjii-msft zadjii-msft removed this from the Terminal Backlog milestone Aug 25, 2020
@ghost
Copy link

ghost commented Aug 25, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Aug 25, 2020
@ghost ghost added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Aug 25, 2020
@electronic-dk
Copy link

@zadjii-msft I thought #4066 spoke about the color profile specifically, while this ticket is about the terminal theme itself (dynamic change without having to restart the terminal). Are these 2 aspects planned to be implemented in scope of one ticket?

@zadjii-msft
Copy link
Member

From the way I understand it:

@b-hayes
Copy link

b-hayes commented Mar 22, 2021

Waiting for this feature. Currently, every time I change to dark/light mode I have to open my terminal config file and comment/uncomment my light colour scheme manually. And yes you would need to set a preferred light scheme, every other application I use does it a similar way.
The smart ones just remember what colour scheme was active last time you were in light/dark mode.

@TBBle
Copy link

TBBle commented Mar 23, 2021

@b-hayes Yup, that's being tracked in #4066.

@Msouza91
Copy link

Msouza91 commented Dec 5, 2023

Waiting for this feature. Currently, every time I change to dark/light mode I have to open my terminal config file and comment/uncomment my light colour scheme manually. And yes you would need to set a preferred light scheme, every other application I use does it a similar way. The smart ones just remember what colour scheme was active last time you were in light/dark mode.

I've setup a cron job using sed and some tricks to change between a light and dark theme, the job runs every 29 minutes and checks if the sun is up using hdate.
https://pastebin.com/LPc2Fe0h

It is a bit hacky, but works, I've setup the terminal to start up with user login.

@zadjii-msft
Copy link
Member

Or, y'know, this feature was added to the Terminal a couple releases back: https://learn.microsoft.com/en-us/windows/terminal/customize-settings/profile-appearance#color-scheme

"colorScheme":
{
    "light": "One Half Light",
    "dark": "One Half Dark",
},

@Msouza91
Copy link

Msouza91 commented Dec 5, 2023

Or, y'know, this feature was added to the Terminal a couple releases back: https://learn.microsoft.com/en-us/windows/terminal/customize-settings/profile-appearance#color-scheme

"colorScheme":
{
    "light": "One Half Light",
    "dark": "One Half Dark",
},

I didn't look too much into it, I couldn't be arsed to read the whole thread so I made a quick hack for it, thanks for showing me this. Now it syncs perfectly with Night Light settings and Auto Dark Mode.

@Kellen-Stuart
Copy link

I don't know why but mine just stays on dark no matter what.

"profiles": 
    {
        "defaults": 
        {
            "colorScheme": {
                "dark": "Ayu Dark",
                "light": "Ayu Light"
            },
            "font": 
            {
                "size": 16.0
            }
        },
        "list": 
        ...

@adityamwagh
Copy link

@Kellen-Stuart We need to see your complete config file to point out the issue.

@zadjii-msft
Copy link
Member

I'm guessing it's your theme setting. That needs to be set to default (or, "use windows theme") to allow the app to switch between themes, so that the scheme can match the app's theme.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests