chore: lots of improvements, exec apps with uwsm if in usage

also, started using `AstalWp.Endpoint.description` instead of the `name` property when showing device names, thanks to @NotMephisto in #9
This commit is contained in:
retrozinndev
2025-06-15 20:29:16 -03:00
parent 1e0a158b39
commit a669e1acc3
21 changed files with 119 additions and 100 deletions
+7 -5
View File
@@ -12,11 +12,11 @@ export class Stylesheet {
"./style.scss"
];
public compileSass(): void {
public async compileSass(): Promise<void> {
console.log("Stylesheet: Compiling Sass");
exec(`bash -c "sass ${this.#styles.map(style => `-I ${style}`).join('\s')
} ${this.#outputPath.get_path()!}/style.css"`);
exec(`bash -c "sass ${this.#styles.map(style => `-I ${style}`).join('\s')} ${
this.#outputPath.get_path()!}/style.css"`);
}
public async reapply(cssFilePath: string): Promise<void> {
@@ -37,8 +37,10 @@ export class Stylesheet {
}
public async compileApply(): Promise<void> {
this.compileSass();
this.reapply(this.#outputPath.get_path()! + "/style.css");
await this.compileSass().catch((err: Gio.IOErrorEnum) =>
console.error(`Stylesheet: An Error occurred and Sass couldn't be compiled. Stderr:\n${err.message ?
`\t${err.message}\n` : ""}${err.stack}\n`)
).then(() => this.reapply(this.#outputPath.get_path()! + "/style.css"));
}
public static getDefault(): Stylesheet {