add matugen support for hyprland

This commit is contained in:
Sem
2026-03-30 20:56:59 +02:00
parent 029cd7ae55
commit ddd9a93679
6 changed files with 204 additions and 101 deletions

View File

@@ -43,82 +43,14 @@ block_postfix = "*>"
contrast = 1.0
[config.wallpaper]
# Whether to set the wallpaper or not
set = true
# The base command to run for applying the wallpaper.
# Keywords like {{ image }} or anything that works inside of hooks works here.
# You could also set a static color if you use the color keywords and the wallpaper setter supports it.
command = "swww img --transition-type center {{ image }}"
command = "awww img {{ image }} --transition-type grow --transition-fps 60 --transition-duration 0.6"
# Whether to set the wallpaper or not
set = true
# For example, killing the wallpaper daemon. Usage is like a normal hook.
# pre_hook = ""
# If you don't want to use the other colors that are automatically generated (on_color, on_color_container) you can just import a custom json with the colors instead.
# For an example of importing json see: https://iniox.github.io/#matugen/usage/importing-json
[config.custom_colors]
red = "#ff0000"
blue = "#0000ff"
green = "#00ff00"
[templates.includeme]
input_path = "./include.txt"
# The output path is optional if you just want to import the template anyways.
# output_path = "./a/include.txt"
[templates.name1]
# Relative paths will be resolved from the path `config.toml` is in.
input_path = "./colors.whatever-extension"
output_path = "./a/colors-generated.whatever-extension"
# Defaults to a value of 0 if unspecified, determines the order that each template is processed.
# You can use index = n to force a particular template hook to run after everything else, and index = -n for before everything else
index = 1
# Defaults to the type from CLI if unspecified.
# One of `SchemeContent`, `SchemeExpressive`, `SchemeFidelity`, `SchemeFruitSalad`, `SchemeMonochrome`, `SchemeNeutral`, `SchemeRainbow`, `SchemeTonalSpot`, `SchemeVibrant`
type = "SchemeExpressive"
# For testing of the `--continue-on-error` flag
# [templates.ishoulderror]
# Relative paths will be resolved from the path `config.toml` is in.
# input_path = "./error-testing.txt"
# output_path = "./a/error-testing.txt"
# This will use a different input path depending on what mode you use.
# input_path_modes = { dark = "./colors.whatever-extension", light = "./colors.whatever-extension" }
# This will compare all of the colors inside the array with the color you set as `compare_to`, and returns the closest color to it.
# You can then use `{{closest_color}}` inside hooks.
colors_to_compare = [
{ name = "black", color = "#000000" },
{ name = "red", color = "#ff0000" },
{ name = "maroon", color = "#800000" },
{ name = "yellow", color = "#ffff00" },
{ name = "olive", color = "#808000" },
{ name = "lime", color = "#00ff00" },
{ name = "green", color = "#008000" },
{ name = "aqua", color = "#00ffff" },
{ name = "teal", color = "#008080" },
{ name = "blue", color = "#0000ff" },
{ name = "navy", color = "#000080" },
{ name = "fuchsia", color = "#ff00ff" },
{ name = "purple", color = "#800080" },
]
compare_to = "{{colors.primary.default.hex}}"
# Runs before the template is exported. You can use keywords here.
# If you want the command to be async, add an & symbol to the end of the command on unix.
pre_hook = 'echo "source color {{colors.source_color.default.hex}}, source image {{image}}, closest color {{closest_color}}"'
# Runs after the template is exported. You can use keywords here.
# If you want the command to be async, add an & symbol to the end of the command on unix.
post_hook = 'echo "after gen"'
# For overriding the prefix for a specific template only
expr_prefix = "{{"
expr_postfix = "}}"
# Only hex values
# https://m3.material.io/styles/color/advanced/adjust-existing-colors#1cc12e43-237b-45b9-8fe0-9a3549c1f61e
# If you want to use the original color without any harmonization, add `_source` after the name like: `{{ color_source }}`
# Example: To use the original red color you would use `{{ red_source }}` instead of `{{ red }}`
[templates.hyprland]
input_path = '~/linux-dotfiles/matugen/templates/hyprland-colors.conf'
output_path = '~/linux-dotfiles/hypr/colors.conf'
post_hook = "hyprctl reload && echo 'done'"

View File

@@ -0,0 +1,4 @@
<* for name, value in colors *>
$image = {{image}}
${{name}} = rgba({{value.default.hex_stripped}}ff)
<* endfor *>