Dark Mode Kitty and Neovim Using OSX's ToggleEvan Travers
I've been seeking a good toggle for dark/light terminals for a long time.
I have been using a dodgy environment variable… and after fooling around with the OSX dark/light toggle using an Alfred workflow I realized that I pretty much either want the high contrast light or a lower contrast dark across the whole computer.
After googling some stack overflow questions, I found a quick snippet that
checks to see whether dark mode is enabled... later I found a better way using
defaults read -g AppleInterfaceStyle, but it returns either "Dark" or an
error… some more googling revealed that I can use
2>/dev/null to dump the
error to nothingness and just match on "Dark". It's much faster than the
I just put an alias in a
.zshenv file so that it's loaded and usable by
non-interactive shells. I then check it in my
.zshrc and send a message to
Kitty (my terminal of choice at the moment)
to load the right theme.
It doesn't update automatically, but it's close enough.
You can see the changes here.
2022-06-08 11:31:29 -0500Rename articles
2020-06-18 14:26:02 -0500Move everything to CST
Don't know why I didn't do that before. It caused _no_ end of
2019-11-14 19:33:21 -0600Auditing the tags in the site...
Many removed, cleaned up, or renamed.
Tags with only one child got yanked.
2019-07-30 12:06:04 -0500Update check method
2019-07-30 10:21:50 -0500New Post: Kitty/Neovim dark mode