vhakulinen / gnvim

GUI for neovim, without any web bloat
MIT License
1.84k stars 69 forks source link

Handle Gnome dark mode? #198

Open swsnr opened 1 year ago

swsnr commented 1 year ago

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 🙂

vhakulinen commented 1 year ago

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 commented 4 months ago

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?

swsnr commented 4 months ago

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