From 4d63001a92dc9c609982ed6fc3a34b6e862ad046 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 26 Jan 2025 14:23:01 +1100 Subject: scheme: dynamic scheme for discord --- scheme/apply-scheme.fish | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'scheme') diff --git a/scheme/apply-scheme.fish b/scheme/apply-scheme.fish index df5bcba..cf15156 100755 --- a/scheme/apply-scheme.fish +++ b/scheme/apply-scheme.fish @@ -14,6 +14,15 @@ function gen-scss end end +function gen-scss-palette + echo '$palette: (' + for colour in $argv + set -l split (string split ' ' $colour) + echo " \"$split[1]\": #$split[2]," + end + echo ');' +end + function gen-foot cp (dirname (status filename))/../data/foot.template $CONFIG/../foot/schemes/dynamic.ini for colour in $argv @@ -42,6 +51,13 @@ if test -d $CONFIG/safeeyes/scheme gen-scss $colours > $CONFIG/safeeyes/scheme/_dynamic.scss end +if test -d $CONFIG/discord/dynamic && test -d $CONFIG/discord/themes + log 'Generating discord scheme' + gen-scss $colours > $CONFIG/discord/dynamic/_variables.scss + gen-scss-palette $colours >> $CONFIG/discord/dynamic/_variables.scss + sass -q --no-charset --no-source-map $CONFIG/discord/dynamic/dynamic.scss $CONFIG/discord/themes/dynamic.theme.css +end + if test -d $CONFIG/../foot/schemes log 'Generating foot scheme' gen-foot $colours -- cgit v1.2.3-freya