A terminal script to get notified when macOS changes its appearance (dark/light mode)
- Published at
- Updated at
- Reading time
If you're using a Mac, you might have noticed that Apple's operating system now comes with a setting to automatically toggle the UI between light and dark mode ("Appearance: Auto").
The "auto" appearance value adjusts the UI to be bright during the day and enter dark mode UI later in the day.
While many applications automatically change the display mode from light to dark or vice versa, terminal applications don't adjust their theme depending on light or dark mode. Fatih Arslan went on the journey to make vim, tmux, and other programs dark mode aware. He describes in great detail how they were able to make terminal applications react to dark mode on macOS.
If you want to implement something as a reaction to dark mode, read Fatih's article or check out Fatih's friend's GitHub project – dark-mode-modify.