Theming with Matugen
Tsumiki can use Matugen to generate a Material You palette from your wallpaper.
Add or update this section in config.toml under styling:
[matugen]enabled = truewallpaper = "~/Pictures/wallpaper.jpg"scheme = "scheme-tonal-spot"mode = "dark"contrast = 0.0Fields
Section titled “Fields”enabled(bool): generate palette on startup when possible.wallpaper(string): path to image source. Supports~.scheme(string): Matugen scheme identifier. Common values:scheme-tonal-spot(default)scheme-contentscheme-expressivescheme-fidelityscheme-fruit-saladscheme-monochromescheme-neutralscheme-rainbow
mode(string):darkorlight.contrast(float): between-1.0and1.0.
Config Template Path
Section titled “Config Template Path”Tsumiki ships a template at assets/matugen/config.toml.
By default, the service uses:
~/.config/tsumiki/assets/matugen/config.toml
If you need custom behavior, copy that file and adjust it.
Running Matugen
Section titled “Running Matugen”-
Automatic: When
matugen.enabled = true, Tsumiki runs Matugen during startup. -
Manual (shell):
matugen image -q ~/Pictures/wallpaper.jpg -t scheme-tonal-spot --mode dark --contrast 0.0 --config ~/.config/tsumiki/assets/matugen/config.toml- Manual (Python service):
from services.matugen import MatugenService
mat = MatugenService()mat.generate_sync("/home/user/Pictures/wallpaper.jpg")# ormat.generate("/home/user/Pictures/wallpaper.jpg") # asyncTroubleshooting
Section titled “Troubleshooting”- Ensure the
matugenbinary is installed and onPATH. - Ensure the
wallpaperpath exists and is accessible. - If colors look stale, restart Tsumiki and regenerate.
- If imports/cache become inconsistent after local edits, clear
*.pycand__pycache__.
Matugen produces color variables consumed by styles/theme.scss during CSS compilation.
When you change wallpaper or Matugen config, regenerate and recompile styles.
Quick Example
Section titled “Quick Example”Generate palette and recompile in one command:
matugen image ~/Pictures/wallpaper.jpg -t scheme-tonal-spot --mode dark --contrast 0.0 --config ~/.config/tsumiki/assets/matugen/config.toml && ./tsumiki.sh -recompileInteractive (Python REPL within Tsumiki environment):
from services.matugen import MatugenService
m = MatugenService()m.generate_sync("~/Pictures/wallpaper.jpg")Enable matugen under styling in config.toml, ensure matugen is installed, and Tsumiki will generate colors on startup or when you run the service manually.