Sync Pi's TUI theme with the macOS system appearance. When macOS switches between light and dark, Pi switches to the theme you mapped to each mode.
Detection is event-driven: a tiny osascript (JXA) helper subscribes to the
macOS AppleInterfaceThemeChangedNotification and reports changes instantly. If
the helper cannot start it falls back to lightweight polling, and on non-macOS
systems the auto-sync is a no-op.
pi install git:github.com/Inv1x/pi-mac-system-theme
# or, for a local checkout:
pi install /absolute/path/to/pi-mac-system-theme/mac-theme [dark|light|both]
/mac-theme//mac-theme both– pick both themes in sequence/mac-theme dark– pick the theme used while macOS is in dark mode/mac-theme light– pick the theme used while macOS is in light mode
The mapping is stored under macSystemTheme in <agent-dir>/settings.json
(resolved via the agent's config directory, so it honors $PI_AGENT_DIR and pi
forks):
{
"macSystemTheme": {
"darkTheme": "dark",
"lightTheme": "light"
}
}