Files
pascalyazid 8aea20ea9f feat(theme): sync shell palette with greetd greeter
- Export compiled greeter CSS and wallpaper to /var/tmp for the greeter user.

- Serialize theme changes so rapid switches cannot race wal and sass.

- Avoid duplicate greeter export on startup and disable sass source maps.

- Pass command arguments as arrays and use forEach when creating windows.
2026-11-27 18:55:33 +01:00

30 lines
775 B
TypeScript

import app from "ags/gtk4/app"
import { exec } from "ags/process"
import GLib from "gi://GLib?version=2.0"
import Bar from "./widget/Bar"
import PowerMenu from "./widget/PowerMenu"
import { initThemeSync, restoreTheme } from "./theme"
initThemeSync()
const HOME = GLib.getenv("HOME") || ""
const colorsPath = `${HOME}/.cache/wal/colors.scss`
if (!GLib.file_test(colorsPath, GLib.FileTest.EXISTS)) {
const agsDir = `${HOME}/.config/ags`
exec(["wal", "-q", "-n", "-i", `${agsDir}/pywal.jpg`])
}
const scss = `${HOME}/.config/ags/style.scss`
const css = `/tmp/ags-compiled-style.css`
exec(["sass", "--no-source-map", scss, css])
app.start({
css: css,
main() {
restoreTheme()
app.get_monitors().forEach(Bar)
app.get_monitors().forEach(PowerMenu)
},
})