Create a function to toggle between light and dark
dpassen opened this issue · comments
Inspired by modus-themes, would it be possible to have a function to toggle between light and dark variants?
Great idea @dpassen! I whipped up a simple implementation of this based on modus. Give it a try! I'll investigate the extra work that modus does and maybe implement that to make the function more robust later.
Works for me
Great! It seems like the extra work modus is doing is ensuring that the theme is properly loaded and that the one getting un-toggled gets flushed out, which probably adds some robustness. I'll look over that some day, but in the meanwhile, this works under assumptions that the user knows what they are doing.