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

Automatically detect light or dark mode based on system settings #5561

Closed
MeerBiene opened this issue Jan 21, 2022 · 7 comments
Closed

Automatically detect light or dark mode based on system settings #5561

MeerBiene opened this issue Jan 21, 2022 · 7 comments

Comments

@MeerBiene
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

It would be neat to have to option to choose a theme for light mode and one theme for dark mode - kinda like github did it

Describe the solution you'd like
A clear and concise description of what you want to happen.

  • Switch to toggle "automatic mode" switching
  • Option to choose either only one theme or 2 themes when the automatic dark mode is activated

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

I thought about writing a plugin but this seems like it should be a core functionality

Additional context
Add any other context or screenshots about the feature request here.

@Arro
Copy link

Arro commented Apr 16, 2022

+1 for this. Would be nice. Feels like a must-have feature these days.

@zhouzq-thu
Copy link

+1, maybe just check if

defaults read -g AppleInterfaceStyle

is 'Dark' or 'does not exist'.

@ysc3839
Copy link
Contributor

ysc3839 commented May 5, 2022

On Windows, you can read registry HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize AppsUseLightTheme DWORD value to get dark mode setting for apps. When dark mode changed, there will be WM_SETTINGCHANGE message sent to top-level windows, with lParam = wchar_t* "ImmersiveColorSet".

@ChihGodlee
Copy link

Is there any progress on this issue?

@0xJohnnyboy
Copy link

+1, really looking forward to using this feature

@rmkraus
Copy link

rmkraus commented May 11, 2023

I've only done some preliminary testing on this, but I think there is a workaround. To implement this behavior easily.

In the Appearance menu in settings, there is a Custom CSS field. With this, it is possible to change styling based on the system preferred light/dark settings. Here is an example:

/* * { color: blue !important; } */

@media (prefers-color-scheme: light) {
    * {
        background-color: white !important;
        color: black !important;
    }
}

@media (prefers-color-scheme: dark) {
    * {
        background-color: black !important;
        color: white !important;
    }
}

When I have a few more minutes, I'll try creating a full style sheet based on a pair of the community themes that are here:
https://github.com/Eugeny/tabby/tree/master/tabby-community-color-schemes/schemes

GitHub
A terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.

@Eugeny
Copy link
Owner

Eugeny commented Jul 18, 2023

Coming to the nightly build in https://github.com/Eugeny/tabby/actions/runs/5592726182

GitHub
A terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.

@Eugeny Eugeny closed this as completed Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants