matugen: update templates to new custom variable formats

This commit is contained in:
Nico 2025-11-22 13:39:05 +11:00
parent 8cd4eac37c
commit 3e5aaf703c
Signed by: nico
SSH key fingerprint: SHA256:XuacYOrGqRxC3jVFjfLROn1CSvLz85Dec6N7O9Gwu/0
9 changed files with 36 additions and 32 deletions

View file

@ -1,12 +1,12 @@
[config]
import_json_files = ["./custom.json"]
caching = false
[config.wallpaper] [config.wallpaper]
command = "swww" command = "swww"
arguments = ["img", "--transition-type", "center"] arguments = ["img", "--transition-type", "center"]
set = true set = true
[config.custom_keywords]
font = "ComicShannsMono Nerd Font"
rounding = "10"
[templates.waybar] [templates.waybar]
input_path = './templates/colors.css' input_path = './templates/colors.css'
output_path = '~/.config/waybar/colors.css' output_path = '~/.config/waybar/colors.css'

View file

@ -0,0 +1,4 @@
{
"font": "ComicShannsMono Nerd Font",
"rounding": 10
}

View file

@ -4,8 +4,8 @@
*/ */
* { * {
font-family: {{ custom.font }}; font-family: {{ font }};
border-radius: {{custom.rounding}}px; border-radius: {{ rounding }}px;
} }
<* for name, value in colors *> <* for name, value in colors *>

View file

@ -17,7 +17,7 @@
/* customize things here */ /* customize things here */
:root { :root {
/* font, change to 'gg sans' for default discord font*/ /* font, change to 'gg sans' for default discord font*/
--font: '{{custom.font}}'; --font: '{{ font }}';
/* top left corner text */ /* top left corner text */
--corner-text: 'Midnight'; --corner-text: 'Midnight';
@ -65,12 +65,12 @@
--icon-spin-transition: 1s ease; /* round icon button spin (settings, emoji, etc.) */ --icon-spin-transition: 1s ease; /* round icon button spin (settings, emoji, etc.) */
/* corner roundness (border-radius) */ /* corner roundness (border-radius) */
--roundness-xl: {{custom.rounding}}px; /* roundness of big panel outer corners */ --roundness-xl: {{ rounding }}px; /* roundness of big panel outer corners */
--roundness-l: {{custom.rounding}}px; /* popout panels */ --roundness-l: {{ rounding }}px; /* popout panels */
--roundness-m: {{custom.rounding}}px; /* smaller panels, images, embeds */ --roundness-m: {{ rounding }}px; /* smaller panels, images, embeds */
--roundness-s: {{custom.rounding}}px; /* members, settings inputs */ --roundness-s: {{ rounding }}px; /* members, settings inputs */
--roundness-xs: {{custom.rounding}}px; /* channels, buttons */ --roundness-xs: {{ rounding }}px; /* channels, buttons */
--roundness-xxs: {{custom.rounding}}px; /* searchbar, small elements */ --roundness-xxs: {{ rounding }}px; /* searchbar, small elements */
/* direct messages moon icon */ /* direct messages moon icon */
/* change to block to show, none to hide */ /* change to block to show, none to hide */
@ -88,7 +88,7 @@
/* Setting font in :root doesn't work for some reason */ /* Setting font in :root doesn't work for some reason */
body { body {
font-family: '{{custom.font}}'; font-family: '{{ font }}';
} }
/* Selected chat/friend text */ /* Selected chat/friend text */

View file

@ -5,7 +5,7 @@ general {
} }
decoration { decoration {
rounding = {{custom.rounding}} rounding = {{ rounding }}
shadow { shadow {
color = rgba({{colors.shadow.default.hex_stripped}}ee) color = rgba({{colors.shadow.default.hex_stripped}}ee)
} }

View file

@ -27,11 +27,11 @@ input-field {
fail_color = {{colors.error_container.default.rgba}} fail_color = {{colors.error_container.default.rgba}}
font_color = {{colors.primary.default.rgba}} font_color = {{colors.primary.default.rgba}}
font_family = {{custom.font}} font_family = {{ font }}
placeholder_text = Enter password placeholder_text = Enter password
size = 48 size = 48
fade_on_empty = false fade_on_empty = false
rounding = {{custom.rounding}} rounding = {{ rounding }}
halign = center halign = center
valign = center valign = center
@ -39,7 +39,7 @@ input-field {
} }
label { label {
font_family = {{custom.font}} font_family = {{ font }}
color = {{colors.primary.default.rgba}} color = {{colors.primary.default.rgba}}
font_size = 24 font_size = 24
text =  Hello text =  Hello
@ -51,7 +51,7 @@ label {
shape { shape {
color = {{colors.background.default.rgba}} color = {{colors.background.default.rgba}}
rounding = {{custom.rounding}} rounding = {{ rounding }}
monitor = monitor =
size = 150, 60 size = 150, 60
@ -66,7 +66,7 @@ shape {
label { label {
color = {{colors.primary.default.rgba}} color = {{colors.primary.default.rgba}}
font_family = {{custom.font}} font_family = {{ font }}
font_size = 17 font_size = 17
rotate = 270 rotate = 270
text = cmd[update:60]echo 󰎇 $(head -c 30 <<< $(playerctl metadata title)) text = cmd[update:60]echo 󰎇 $(head -c 30 <<< $(playerctl metadata title))
@ -80,7 +80,7 @@ label {
shape { shape {
color = {{colors.background.default.rgba}} color = {{colors.background.default.rgba}}
rounding = {{custom.rounding}} rounding = {{ rounding }}
monitor = monitor =
size = 50, 410 size = 50, 410
@ -92,7 +92,7 @@ shape {
# Clock # Clock
label { label {
color = {{colors.primary.default.rgba}} color = {{colors.primary.default.rgba}}
font_family = {{custom.font}} font_family = {{ font }}
font_size = 17 font_size = 17
text = cmd[update:60]echo -e " \n$(date '+%I\n%M')" text = cmd[update:60]echo -e " \n$(date '+%I\n%M')"
@ -105,7 +105,7 @@ label {
shape { shape {
color = {{colors.background.default.rgba}} color = {{colors.background.default.rgba}}
rounding = {{custom.rounding}} rounding = {{ rounding }}
monitor = monitor =
size = 50, 110 size = 50, 110

View file

@ -2,7 +2,7 @@
killall borders 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 & 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 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 & 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 &

View file

@ -1,6 +1,6 @@
export PRIMARY_COLOUR="0xFF{{colors.primary.default.hex_stripped}}" export PRIMARY_COLOUR="0xFF{{colors.primary.default.hex_stripped}}"
export SECONDARY_COLOUR="0xFF{{colors.secondary.default.hex_stripped}}" export SECONDARY_COLOUR="0xFF{{colors.secondary.default.hex_stripped}}"
export BACKGROUND_COLOUR=0xFF"{{colors.background.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 }}"

View file

@ -8,8 +8,8 @@
@define-color primary {{colors.primary_container.default.hex}}; @define-color primary {{colors.primary_container.default.hex}};
* { * {
font-family: {{ custom.font }}; font-family: {{ font }};
background-radius: {{ custom.rounding}}px; background-radius: {{ rounding }}px;
} }
#window, #window,
@ -47,7 +47,7 @@ slider,
} }
#box { #box {
border-radius: {{custom.rounding}}px; border-radius: {{ rounding }}px;
background: @background; background: @background;
padding: 32px; padding: 32px;
border: 1px solid lighter(@background); border: 1px solid lighter(@background);
@ -79,7 +79,7 @@ slider,
#password, #password,
#input, #input,
#typeahead { #typeahead {
border-radius: {{custom.rounding}}px; border-radius: {{ rounding }}px;
} }
#input { #input {
@ -107,7 +107,7 @@ slider,
child { child {
padding: 8px; padding: 8px;
border-radius: {{custom.rounding}}px; border-radius: {{ rounding }}px;
} }
child:selected, child:selected,
@ -154,7 +154,7 @@ child:hover {
.aiItem { .aiItem {
padding: 10px; padding: 10px;
border-radius: {{custom.rounding}}px; border-radius: {{ rounding }}px;
color: @foreground; color: @foreground;
background: @background; background: @background;
} }