summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscheme/apply-scheme.fish16
1 files changed, 16 insertions, 0 deletions
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