forked from Shinonome/dots-hyprland
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:
@@ -29,7 +29,7 @@ Utils.exec(`bash -c 'echo "" > ${App.configDir}/scss/_musicmaterial.scss'`); //
|
|||||||
async function applyStyle() {
|
async function applyStyle() {
|
||||||
const COMPILED_STYLE_DIR = `${GLib.get_user_cache_dir()}/ags/user/generated`
|
const COMPILED_STYLE_DIR = `${GLib.get_user_cache_dir()}/ags/user/generated`
|
||||||
Utils.exec(`mkdir -p ${COMPILED_STYLE_DIR}`);
|
Utils.exec(`mkdir -p ${COMPILED_STYLE_DIR}`);
|
||||||
Utils.exec(`sassc ${App.configDir}/scss/main.scss ${COMPILED_STYLE_DIR}/style.css`);
|
Utils.exec(`sass ${App.configDir}/scss/main.scss ${COMPILED_STYLE_DIR}/style.css`);
|
||||||
App.resetCss();
|
App.resetCss();
|
||||||
App.applyCss(`${COMPILED_STYLE_DIR}/style.css`);
|
App.applyCss(`${COMPILED_STYLE_DIR}/style.css`);
|
||||||
console.log('[LOG] Styles loaded')
|
console.log('[LOG] Styles loaded')
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ const CoverArt = ({ player, ...rest }) => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
exec(`wal -i "${player.coverPath}" -n -t -s -e -q ${lightDark}`)
|
exec(`wal -i "${player.coverPath}" -n -t -s -e -q ${lightDark}`)
|
||||||
exec(`cp ${GLib.get_user_cache_dir()}/wal/colors.scss ${App.configDir}/scss/_musicwal.scss`);
|
exec(`cp ${GLib.get_user_cache_dir()}/wal/colors.scss ${App.configDir}/scss/_musicwal.scss`);
|
||||||
exec(`sassc ${App.configDir}/scss/_music.scss ${stylePath}`);
|
exec(`sass ${App.configDir}/scss/_music.scss ${stylePath}`);
|
||||||
// self.css = `background-image: url('${coverPath}');`;
|
// self.css = `background-image: url('${coverPath}');`;
|
||||||
Utils.timeout(200, () => self.attribute.showImage(self, coverPath));
|
Utils.timeout(200, () => self.attribute.showImage(self, coverPath));
|
||||||
App.applyCss(`${stylePath}`);
|
App.applyCss(`${stylePath}`);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ apply_gtklock() {
|
|||||||
|
|
||||||
# Copy template
|
# Copy template
|
||||||
mkdir -p "$HOME"/.cache/ags/user/generated/gtklock
|
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
|
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() {
|
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 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);'
|
||||||
ags run-js "App.resetCss(); App.applyCss('${HOME}/.config/ags/style.css');"
|
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
|
cat color_generation/pywal_to_material.scss >> "$HOME"/.cache/ags/user/generated/material_colors.scss
|
||||||
if [ "$2" = "--apply" ]; then
|
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/ { 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
|
||||||
sed -i "s/}//g" "$HOME"/.cache/ags/user/generated/colors_classes.scss
|
sed -i "s/}//g" "$HOME"/.cache/ags/user/generated/colors_classes.scss
|
||||||
|
|||||||
@@ -69,7 +69,8 @@ $osk_key_fontsize: 1.091rem;
|
|||||||
|
|
||||||
.osk-key-fn {
|
.osk-key-fn {
|
||||||
min-width: $osk_key_width * 1.005;
|
min-width: $osk_key_width * 1.005;
|
||||||
min-height: $osk_key_height / 2;
|
min-height: calc($osk_key_height / 2); // dart-sass
|
||||||
|
// min-height: $osk_key_height / 2; // sassc
|
||||||
}
|
}
|
||||||
|
|
||||||
.osk-key-tab {
|
.osk-key-tab {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
### PKGs on same line will be send to `yay` together, unless `-f` is specified.
|
### PKGs on same line will be send to `yay` together, unless `-f` is specified.
|
||||||
|
|
||||||
### Basic
|
### Basic
|
||||||
coreutils cliphist curl fuzzel rsync wget ripgrep gojq npm meson typescript gjs sassc
|
coreutils cliphist curl fuzzel rsync wget ripgrep gojq npm meson typescript gjs dart-sass
|
||||||
|
|
||||||
### Python
|
### Python
|
||||||
# Add `python-setuptools-scm` and `python-wheel` explicitly to fix #197
|
# Add `python-setuptools-scm` and `python-wheel` explicitly to fix #197
|
||||||
|
|||||||
Reference in New Issue
Block a user