fix colors 1

This commit is contained in:
Pascal Thuma committed 2026-03-25 00:00:10 +01:00
1 parent b3d916d832
commit 77acc049d8
2 files changed
+16 -2

No files matched your search

+16 -2
View File
@@ -1,11 +1,25 @@
import app from "ags/gtk4/app"
import style from "./style.scss"
import { exec } from "ags/process"
import GLib from "gi://GLib?version=2.0"
import Bar from "./widget/Bar"
import PowerMenu from "./widget/PowerMenu"
import { restoreTheme } from "./theme"
const HOME = GLib.getenv("HOME") || ""
const colorsPath = `${HOME}/.cache/wal/colors.scss`
if (!GLib.file_test(colorsPath, GLib.FileTest.EXISTS)) {
console.log("No pywal colors found, generating default from pywal.png...")
const agsDir = `${HOME}/.config/ags`
exec(`wal -q -n -i ${agsDir}/pywal.png`)
}
const scss = `${HOME}/.config/ags/style.scss`
const css = `/tmp/ags-compiled-style.css`
exec(`sass ${scss} ${css}`)
app.start({
css: style,
css: css,
main() {
restoreTheme()
app.get_monitors().map(Bar)