use dart-sass instead of sassc

compilation is twice slower but i guess not deprecated is good. style compile is async and ags takes like 1s to start anyway...
This commit is contained in:
end-4
2024-02-23 16:59:48 +07:00
parent 3b4ced6591
commit 1f830307c6
6 changed files with 8 additions and 7 deletions
@@ -65,7 +65,7 @@ apply_gtklock() {
# Copy template
mkdir -p "$HOME"/.cache/ags/user/generated/gtklock
sassc "scripts/templates/gtklock/main.scss" "$HOME"/.cache/ags/user/generated/gtklock/style.css
sass "scripts/templates/gtklock/main.scss" "$HOME"/.cache/ags/user/generated/gtklock/style.css
cp "$HOME"/.cache/ags/user/generated/gtklock/style.css "$HOME"/.config/gtklock/style.css
}
@@ -188,7 +188,7 @@ apply_gtk() { # Using gradience-cli
}
apply_ags() {
sassc "$HOME"/.config/ags/scss/main.scss "$HOME"/.config/ags/style.css
sass "$HOME"/.config/ags/scss/main.scss "$HOME"/.config/ags/style.css
ags run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);'
ags run-js "App.resetCss(); App.applyCss('${HOME}/.config/ags/style.css');"
}
@@ -42,7 +42,7 @@ elif [ "$backend" = "pywal" ]; then
cat color_generation/pywal_to_material.scss >> "$HOME"/.cache/ags/user/generated/material_colors.scss
if [ "$2" = "--apply" ]; then
sassc "$HOME"/.cache/ags/user/generated/material_colors.scss "$HOME"/.cache/ags/user/generated/colors_classes.scss --style compact
sass "$HOME"/.cache/ags/user/generated/material_colors.scss "$HOME"/.cache/ags/user/generated/colors_classes.scss --style compact
sed -i "s/ { color//g" "$HOME"/.cache/ags/user/generated/colors_classes.scss
sed -i "s/\./$/g" "$HOME"/.cache/ags/user/generated/colors_classes.scss
sed -i "s/}//g" "$HOME"/.cache/ags/user/generated/colors_classes.scss