theme_dict
A theme_dict is the final, merged configuration dictionary generated when you apply a Theme. It contains all the colors, style, and module-specific settings that are passed to modules to actually apply your rice.
How to view the theme_dict
You can print the generated theme_dict
for any theme application command by adding the --print-theme-dict
flag:
This is handy for debugging and for understanding exactly what values are being passed to your modules.
Structure
A theme_dict
contains fields from your palette, style, and theme, all merged together. Here's an example:
Common fields
- term: 16 terminal colors (
color0
–color15
) - normal: main background/foreground
- primary: main accent color
- secondary: secondary accent color
- theme_name: name of the applied theme
- wallpaper: wallpaper info (path, mode, thumb)
- mode: current mode (e.g.
dark
,light
) - bar, panel, dialog, input, muted, accent, destructive: style blocks for UI elements
- border, blur, font, gaps, opacity, padding, shadow, titlebar, animations, cursor: style settings
- modules_styles: per-module overrides (see style docs)
The exact fields depend on your palette, style, and theme configuration.
Merge order
The theme_dict
is generated by merging, in order (each step overrides the previous):
- Base Style: from
PIMP_CONFIG_DIR/base_style.json
- Palette
- Theme style (from
theme.json
) - Mode style (from
theme.json
) - CLI styles: from
PIMP_CONFIG_DIR/styles/STYLE_NAME
via--style=STYLE1,STYLE2
- Module specific styles
Additionally, theme_name
, wallpaper
, and mode
are always set at the top level.
How modules use theme_dict
When a module runs, it receives the theme_dict
as input. This lets templates, shell commands, and Python hooks access all the merged color and style values. Module-specific overrides from modules_styles
are automatically merged in for each module.
Tips & Tricks
- Use
--print-theme-dict
to debug and see exactly what values are available. - You can reference any field in your module templates using Jinja, e.g.
{{primary.bg}}
,{{opacity.terminal}}
. - If a value isn't what you expect, check the merge order above.
- See the style, palette, and theme docs for more details on each section.