Skip to content

iodic/pi-auto-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-auto-theme

Automatically switch pi themes based on macOS system appearance.

Polls system dark/light mode every 3 seconds and applies the matching theme. Works with any installed pi themes.

pi-auto-theme

Install

pi install git:github.com/iodic/pi-auto-theme

Or add to ~/.pi/agent/settings.json:

{
  "packages": ["git:github.com/iodic/pi-auto-theme"]
}

Usage

On first run, auto-theme maps to pi's built-in dark and light themes. Use /auto-theme config to pick your preferred themes:

/auto-theme config

This opens a picker for both dark and light mode themes from all installed themes.

Commands

Command Description
/auto-theme Show current config and status
/auto-theme config Pick which themes map to dark & light mode
/auto-theme on Enable auto-switching
/auto-theme off Disable auto-switching

Example with ayu themes

{
  "packages": [
    "git:github.com/iodic/pi-ayu-themes",
    "git:github.com/iodic/pi-auto-theme"
  ]
}

Then run /auto-theme config and select ayu-dark for dark mode and ayu-light for light mode.

Config

Saved to ~/.pi/agent/auto-theme.json:

{
  "dark": "ayu-dark",
  "light": "ayu-light",
  "enabled": true
}

Platform

macOS only. Uses osascript to query system appearance. No-op on other platforms.

License

MIT

About

Automatically switch pi themes based on macOS system appearance

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors