Wezterm and Neovim Dark Mode Synced to OSXEvan Travers
This is honestly the main reason that I'm sticking with Wezterm for the moment over Kitty. I've been trying to have OSX, my terminal, and my editor all have the same synced theme for ten years… since iTerm days!
I switch my OS appearance between light and dark mode quite a bit. While I'm chiefly dark mode only, I choose light mode to present on a projector or because I'm in a coffee shop with an early morning glare, or just because I want a change. Because Wezterm is live evaluates its configuration table it can live switch between the two, and I finally found a way to keep Neovim synced. I can change between light and dark and everything on my computer changes flawlessly. * chef's kiss *
Wezterm provides an example function for following the OS appearance rules. It was shockingly easy. In Kitty I was running a Fish command to send the Kitty server a command. This is much easier.
Now Neovim… I started by trying to set an environment variable, but that won't affect already open editors. I found @cormacelf's dark-notify which watches for OS changes on OSX and has a Lua based Neovim plug-in. Now every instance of Neovim shifts along with the OS!
The whole commit for Neovim is here… I just made sure that it gets installed on new boxes, it works, and I'm really happy with it.
Check it out!
2023-04-04 09:05:22 -0500Fix tag
2023-04-04 08:56:22 -0500Wezterm Dark Toggle