You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like Neovide to detect system theme (light / dark) and adjust the 'background' option accordingly.
Neovide should probably listen to winit WindowEvent::ThemeChanged events and update the 'background' option.
Apps that support themes (e.g. Discord) generally allow the user to pick light, dark, or auto, where auto follows the system setting. Neovide should probably offer a similar option since not all uesrs will want their 'background' option to change automatically.
Alternatively, Neovide could provide some sort of hook or event, that a user can subscribe to, by writing code in their configuration file, and they could implement whatever logic to handle it. I don't know enough about neovim to understand if that even makes sense or if it's worth the complexity.
I'd like Neovide to detect system theme (light / dark) and adjust the 'background' option accordingly.
Neovide should probably listen to winit
WindowEvent::ThemeChanged
events and update the'background'
option.Apps that support themes (e.g. Discord) generally allow the user to pick light, dark, or auto, where auto follows the system setting. Neovide should probably offer a similar option since not all uesrs will want their
'background'
option to change automatically.Alternatively, Neovide could provide some sort of hook or event, that a user can subscribe to, by writing code in their configuration file, and they could implement whatever logic to handle it. I don't know enough about neovim to understand if that even makes sense or if it's worth the complexity.
Here's the relevant winit example: https://github.com/rust-windowing/winit/blob/66ff52b0128be9430b32cb5756e124f61d2e67d0/examples/theme.rs#L38-L44. I've tested it on MacOS and it works as expected. Interestingly, if the user overrides the theme by pressing L or D, no ThemeChanged events are triggered when the key is pressed, or when the system theme changes; events are only sent when in Automatic mode.
The text was updated successfully, but these errors were encountered: