From 3e5aaf703cb17171acade21cd7bd97b8dd01a105 Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 22 Nov 2025 13:39:05 +1100 Subject: [PATCH] matugen: update templates to new custom variable formats --- stow/.config/matugen/config.toml | 8 ++++---- stow/.config/matugen/custom.json | 4 ++++ stow/.config/matugen/templates/colors.css | 4 ++-- stow/.config/matugen/templates/discord.css | 16 ++++++++-------- stow/.config/matugen/templates/hyprland.conf | 2 +- stow/.config/matugen/templates/hyprlock.conf | 16 ++++++++-------- stow/.config/matugen/templates/jankyborders.sh | 2 +- stow/.config/matugen/templates/sketchybar.sh | 4 ++-- stow/.config/matugen/templates/walker.css | 12 ++++++------ 9 files changed, 36 insertions(+), 32 deletions(-) create mode 100644 stow/.config/matugen/custom.json diff --git a/stow/.config/matugen/config.toml b/stow/.config/matugen/config.toml index 43fddc1..3edc866 100644 --- a/stow/.config/matugen/config.toml +++ b/stow/.config/matugen/config.toml @@ -1,12 +1,12 @@ +[config] +import_json_files = ["./custom.json"] +caching = false + [config.wallpaper] command = "swww" arguments = ["img", "--transition-type", "center"] set = true -[config.custom_keywords] -font = "ComicShannsMono Nerd Font" -rounding = "10" - [templates.waybar] input_path = './templates/colors.css' output_path = '~/.config/waybar/colors.css' diff --git a/stow/.config/matugen/custom.json b/stow/.config/matugen/custom.json new file mode 100644 index 0000000..ecb9c29 --- /dev/null +++ b/stow/.config/matugen/custom.json @@ -0,0 +1,4 @@ +{ + "font": "ComicShannsMono Nerd Font", + "rounding": 10 +} diff --git a/stow/.config/matugen/templates/colors.css b/stow/.config/matugen/templates/colors.css index 7bfb4a4..5c08d26 100644 --- a/stow/.config/matugen/templates/colors.css +++ b/stow/.config/matugen/templates/colors.css @@ -4,8 +4,8 @@ */ * { - font-family: {{ custom.font }}; - border-radius: {{custom.rounding}}px; + font-family: {{ font }}; + border-radius: {{ rounding }}px; } <* for name, value in colors *> diff --git a/stow/.config/matugen/templates/discord.css b/stow/.config/matugen/templates/discord.css index bd7ad43..3618918 100644 --- a/stow/.config/matugen/templates/discord.css +++ b/stow/.config/matugen/templates/discord.css @@ -17,7 +17,7 @@ /* customize things here */ :root { /* font, change to 'gg sans' for default discord font*/ - --font: '{{custom.font}}'; + --font: '{{ font }}'; /* top left corner text */ --corner-text: 'Midnight'; @@ -65,12 +65,12 @@ --icon-spin-transition: 1s ease; /* round icon button spin (settings, emoji, etc.) */ /* corner roundness (border-radius) */ - --roundness-xl: {{custom.rounding}}px; /* roundness of big panel outer corners */ - --roundness-l: {{custom.rounding}}px; /* popout panels */ - --roundness-m: {{custom.rounding}}px; /* smaller panels, images, embeds */ - --roundness-s: {{custom.rounding}}px; /* members, settings inputs */ - --roundness-xs: {{custom.rounding}}px; /* channels, buttons */ - --roundness-xxs: {{custom.rounding}}px; /* searchbar, small elements */ + --roundness-xl: {{ rounding }}px; /* roundness of big panel outer corners */ + --roundness-l: {{ rounding }}px; /* popout panels */ + --roundness-m: {{ rounding }}px; /* smaller panels, images, embeds */ + --roundness-s: {{ rounding }}px; /* members, settings inputs */ + --roundness-xs: {{ rounding }}px; /* channels, buttons */ + --roundness-xxs: {{ rounding }}px; /* searchbar, small elements */ /* direct messages moon icon */ /* change to block to show, none to hide */ @@ -88,7 +88,7 @@ /* Setting font in :root doesn't work for some reason */ body { - font-family: '{{custom.font}}'; + font-family: '{{ font }}'; } /* Selected chat/friend text */ diff --git a/stow/.config/matugen/templates/hyprland.conf b/stow/.config/matugen/templates/hyprland.conf index 4331982..34d47c1 100644 --- a/stow/.config/matugen/templates/hyprland.conf +++ b/stow/.config/matugen/templates/hyprland.conf @@ -5,7 +5,7 @@ general { } decoration { - rounding = {{custom.rounding}} + rounding = {{ rounding }} shadow { color = rgba({{colors.shadow.default.hex_stripped}}ee) } diff --git a/stow/.config/matugen/templates/hyprlock.conf b/stow/.config/matugen/templates/hyprlock.conf index cad5c84..e71b854 100644 --- a/stow/.config/matugen/templates/hyprlock.conf +++ b/stow/.config/matugen/templates/hyprlock.conf @@ -27,11 +27,11 @@ input-field { fail_color = {{colors.error_container.default.rgba}} font_color = {{colors.primary.default.rgba}} - font_family = {{custom.font}} + font_family = {{ font }} placeholder_text = Enter password size = 48 fade_on_empty = false - rounding = {{custom.rounding}} + rounding = {{ rounding }} halign = center valign = center @@ -39,7 +39,7 @@ input-field { } label { - font_family = {{custom.font}} + font_family = {{ font }} color = {{colors.primary.default.rgba}} font_size = 24 text =  Hello @@ -51,7 +51,7 @@ label { shape { color = {{colors.background.default.rgba}} - rounding = {{custom.rounding}} + rounding = {{ rounding }} monitor = size = 150, 60 @@ -66,7 +66,7 @@ shape { label { color = {{colors.primary.default.rgba}} - font_family = {{custom.font}} + font_family = {{ font }} font_size = 17 rotate = 270 text = cmd[update:60]echo 󰎇 $(head -c 30 <<< $(playerctl metadata title)) @@ -80,7 +80,7 @@ label { shape { color = {{colors.background.default.rgba}} - rounding = {{custom.rounding}} + rounding = {{ rounding }} monitor = size = 50, 410 @@ -92,7 +92,7 @@ shape { # Clock label { color = {{colors.primary.default.rgba}} - font_family = {{custom.font}} + font_family = {{ font }} font_size = 17 text = cmd[update:60]echo -e " \n$(date '+%I\n%M')" @@ -105,7 +105,7 @@ label { shape { color = {{colors.background.default.rgba}} - rounding = {{custom.rounding}} + rounding = {{ rounding }} monitor = size = 50, 110 diff --git a/stow/.config/matugen/templates/jankyborders.sh b/stow/.config/matugen/templates/jankyborders.sh index 29aead7..8c6be6c 100644 --- a/stow/.config/matugen/templates/jankyborders.sh +++ b/stow/.config/matugen/templates/jankyborders.sh @@ -2,7 +2,7 @@ killall borders -if [ "{{custom.rounding}}" = 0 ]; then +if [ "{{ rounding }}" = 0 ]; then nohup borders active_color=0xFF{{colors.primary.default.hex_stripped}} inactive_color=0xFF{{colors.surface_dim.default.hex_stripped}} width=6.0 style=square > /dev/null & else nohup borders active_color=0xFF{{colors.primary.default.hex_stripped}} inactive_color=0xFF{{colors.surface_dim.default.hex_stripped}} width=6.0 style=round > /dev/null & diff --git a/stow/.config/matugen/templates/sketchybar.sh b/stow/.config/matugen/templates/sketchybar.sh index a9fc997..6556fa4 100644 --- a/stow/.config/matugen/templates/sketchybar.sh +++ b/stow/.config/matugen/templates/sketchybar.sh @@ -1,6 +1,6 @@ export PRIMARY_COLOUR="0xFF{{colors.primary.default.hex_stripped}}" export SECONDARY_COLOUR="0xFF{{colors.secondary.default.hex_stripped}}" export BACKGROUND_COLOUR=0xFF"{{colors.background.default.hex_stripped}}" -export FONT="{{custom.font}}" +export FONT="{{ font }}" -export ROUNDING="{{custom.rounding}}" +export ROUNDING="{{ rounding }}" diff --git a/stow/.config/matugen/templates/walker.css b/stow/.config/matugen/templates/walker.css index eb88031..02d62f8 100644 --- a/stow/.config/matugen/templates/walker.css +++ b/stow/.config/matugen/templates/walker.css @@ -8,8 +8,8 @@ @define-color primary {{colors.primary_container.default.hex}}; * { - font-family: {{ custom.font }}; - background-radius: {{ custom.rounding}}px; + font-family: {{ font }}; + background-radius: {{ rounding }}px; } #window, @@ -47,7 +47,7 @@ slider, } #box { - border-radius: {{custom.rounding}}px; + border-radius: {{ rounding }}px; background: @background; padding: 32px; border: 1px solid lighter(@background); @@ -79,7 +79,7 @@ slider, #password, #input, #typeahead { - border-radius: {{custom.rounding}}px; + border-radius: {{ rounding }}px; } #input { @@ -107,7 +107,7 @@ slider, child { padding: 8px; - border-radius: {{custom.rounding}}px; + border-radius: {{ rounding }}px; } child:selected, @@ -154,7 +154,7 @@ child:hover { .aiItem { padding: 10px; - border-radius: {{custom.rounding}}px; + border-radius: {{ rounding }}px; color: @foreground; background: @background; }