5 min read #tools #hyprland

Theme: matugen (Material You)

There is only one source for desktop theming: matugen. It extracts a Material You color palette from the current wallpaper, renders it into theme files for various applications, and triggers a reload. Generate once, apply everywhere. I no longer manually copy color values across a dozen configuration files; this is the foundation for a consistent visual identity across the entire desktop.

Each managed application corresponds to a [templates.*] section in config.toml: you provide a template input, an output path, and use placeholders like @{colors.primary.default.hex} within the template to reference the computed colors. After matugen renders the file, it writes the output and optionally runs a hook to trigger a reload. Adding a new application simply requires adding another block:

[config]
[templates.ghostty]
input_path  = "~/.config/matugen/templates/ghostty"
output_path = "~/.config/ghostty/themes/MaterialYou"

[templates.zellij]
input_path  = "~/.config/matugen/templates/zellij.kdl"
output_path = "~/.config/zellij/themes/MaterialYou.kdl"

The coverage is extensive. Currently, it manages Quickshell, Ghostty, hyprland/hyprlock, fuzzel, fcitx5, GTK3/4, KDE, Zellij, and more. They all update simultaneously when you change your wallpaper.

The "personality" of the color scheme is controlled by two knobs: --mode light|dark to select light or dark mode, and --type to choose a Material You color scheme (scheme-tonal-spot is the default soft look, scheme-vibrant/scheme-expressive are more vivid, and scheme-content stays closer to the wallpaper's dominant colors). Changing the type shifts the entire desktop's intensity, yet maintains a consistent, unified origin.

What truly brings this experience to life are the two post_hook commands, which allow already-running programs to update instantly rather than waiting for the next launch:

post_hook = 'fcitx5-remote -r || true'   # Immediately reload input method skin
# Write the generated OSC color sequences to every pts, changing the color of all open terminal windows on the fly
post_hook = 'for p in /dev/pts/[0-9]*; do [ -w "$p" ] && cat .../ghostty-sequences.txt > "$p"; done; true'

When you change your wallpaper, several terminal windows "whoosh" into the new colors simultaneously. This detail is quite addictive.

flowchart LR
    W[Wallpaper] --> M[matugen]
    M --> QS[(quickshell colors.json)]
    M --> G[Ghostty + OSC]
    M --> X[hyprlock / fuzzel / fcitx5 / GTK / Zellij]
    M -. post_hook .-> R[fcitx5 reload · instant terminal color change]

As a side note, waybar (~/.config/waybar) still retains a fallback status bar configuration, but the top bar is now handled by Quickshell. Both consume matugen's colors, so switching back doesn't require reconfiguring the colors.