Detect System Theme in Emacs
Since I’m using MacOS again for the work, and obviously, I still use Emacs, I wanted to have a functionality which would detect which system theme is being used and load the correct one during Emacs startup. Previously, I have hacked together just a simple script which depended on GTK theme. Basically, If command returns string Adwaita, load light theme, if it returns Adwaita-dark, load dark theme. Later I learned that this might not be the good approach at all, even more so since GNOME developed concept of having Dark and Light theme....