gnvim icon indicating copy to clipboard operation
gnvim copied to clipboard

Handle Gnome dark mode?

Open swsnr opened this issue 3 years ago • 3 comments

Currently gnvim always starts with bg=dark, regardless of the OS (Gnome in my case) dark mode. That's a bit of a regression compared to terminals like WezTerm and Gnome Console which can automatically adjust their color theme to Gnome's dark mode, and allow neovim to detect the background color in order to automatically set the background at startup.

Would it be possible/desired for gnvim to check the OS dark mode at startup and adjust neovims bg accordingly? If so I could look into making a merge request 🙂

swsnr avatar Dec 30 '22 13:12 swsnr

We could read gtk-application-prefer-dark-theme and pass that information to neovim on startup.

If that property does what is required, feel free to make a merge request.

Ref #142

vhakulinen avatar Jan 03 '23 08:01 vhakulinen

Handling the dark theme based on system settings brings once challenge that I faced: user uses "light" system theme, but has set/prefers dark theme for nvim. What should gnvim do in such case?

It seems like that gnome apps in general have app specific setting, which is:

  1. Prefer system theme
  2. Light theme
  3. Dark theme

Would that be reasonable for gnvim too?

vhakulinen avatar Apr 19 '24 20:04 vhakulinen

I'm sorry, I can't say. I no longer use vim.

swsnr avatar Apr 20 '24 17:04 swsnr