$ account f-person
auto-dark-mode.nvim is a Neovim plugin that automatically switches the editor's background between dark and light mode based on the host operating system's appearance setting. It supports macOS (via `defaults read`), Linux (via `dbus-send` with optional `dbus-monitor` for event-driven updates), Windows (via `reg.exe`), and WSL/OrbStack. The plugin polls the system at a configurable interval (default 3000ms) or uses D-Bus monitoring on Linux for immediate updates. It provides user-definable callback functions (`set_dark_mode` and `set_light_mode`) that default to changing Neovim's `background` option. The architecture is modular: `init.lua` handles OS detection and setup, `interval.lua` manages polling/monitoring and theme synchronization, `health.lua` provides a `:checkhealth` diagnostic with benchmarking, and `types.lua` defines type annotations. The code is well-structured with graceful fallbacks for older Neovim versions (0.7.x) and comprehensive error handling for edge cases like running as root or missing system utilities. It is a focused, single-purpose plugin with clean separation of concerns.