Skip to content

Inv1x/pi-mac-system-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-mac-system-theme

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.

Install

pi install git:github.com/Inv1x/pi-mac-system-theme
# or, for a local checkout:
pi install /absolute/path/to/pi-mac-system-theme

Usage

/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

Config

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"
  }
}

About

MacOS theme detection for Pi Agent

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors