blink icon indicating copy to clipboard operation
blink copied to clipboard

[Feature Request] Automatic Theme Toggle

Open pbnj opened this issue 6 years ago • 11 comments

Hi @yury & @carloscabanero 👋

Thank you for this awesome app.

Similar to iPadOS' automatic toggle between light and dark mode, I am wondering if it is possible to have Blink toggle between light and dark themes (or toggle between any 2 themes based on time of day).

For my use-case, I generally prefer lighter themes during the day as it is easier to read black text on white background in bright environments and switch to darker themes at night as it's softer on the eyes in dark environments.

macOS Catalina also supports automatic toggling between light and dark mode as well, which extends to Apple's terminal app as well. Tied with #222, this feature would make for a really nice end-to-end light/dark mode experience on macOS as well as iPadOS, from the overall system all the way down to the vim process running in the terminal.

pbnj avatar Jun 30 '19 21:06 pbnj

Hi @petermbenjamin,

Yep, this is great feature for next release. Thank you.

yury avatar Jul 01 '19 06:07 yury

+1. I'd very much like to be able to configure two themes in Blink's settings which get used depending on whether the system is in Dark Mode or Light Mode. Since 95% of the UI is determined by the scheme, the light-mode/dark-mode switch has little effect otherwise.

goerz avatar Oct 03 '19 21:10 goerz

I was thinking we could extend this through an environment variable to the remote. So emacs or vim can get it too. I know emacs has something like that, @goerz what do you think could work for the vim side?

carloscabanero avatar Oct 04 '19 02:10 carloscabanero

Isn’t that what #222 is about?

goerz avatar Oct 04 '19 02:10 goerz

It actually is :)

carloscabanero avatar Oct 04 '19 02:10 carloscabanero

That would be great. Nearly every of my used apps supports automatic dark mode switching.

helmut72 avatar Apr 10 '20 09:04 helmut72

Any progress?

rrroyal avatar Aug 24 '20 10:08 rrroyal

Would really appreciate this as well.

aabdellah avatar Aug 12 '21 08:08 aabdellah

Would like to add a +1 to this.

sflomenb avatar Aug 13 '21 23:08 sflomenb

I found a workaround. You can create a Blink theme, that listens to changes to the preferred color theme of the OS.

Check whether dark mode is enabled:

window
  .matchMedia("(prefers-color-scheme: dark)")
  .matches

Add an event listener:

window
  .matchMedia("(prefers-color-scheme: dark)")
  .addEventListener("change", setPreferredScheme)

Here is an example theme.

The only caveat is, that the border of the terminal does not change with the color scheme. (Only visible when "Settings -> Appearance -> Default Layout" is set to "Fit" or "Fill".)

EinJochel avatar Mar 15 '22 20:03 EinJochel

Thanks @EinJochel, great workaround, I think the safe area color is set by the app and it's set on tab creation and doesn't listen to trait collection events from iOS when dark mode state changes. I will try to look into it and do a PR if it's straightforward for me.

aabdellah avatar Mar 19 '22 16:03 aabdellah