diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-02-22 19:58:07 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-02-22 19:58:07 +1100 |
| commit | cf55e2613314e27243c60395e58665b9309280c8 (patch) | |
| tree | 572b6226dad2c84621deb33d765d5a67454fc842 /app.tsx | |
| parent | scss: make notifpopup shadow default (diff) | |
| download | caelestia-shell-cf55e2613314e27243c60395e58665b9309280c8.tar.gz caelestia-shell-cf55e2613314e27243c60395e58665b9309280c8.tar.bz2 caelestia-shell-cf55e2613314e27243c60395e58665b9309280c8.zip | |
config: use config file
Config file at ~/.config/caelestia/shell.json
Diffstat (limited to 'app.tsx')
| -rw-r--r-- | app.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -9,8 +9,9 @@ import Players from "@/services/players"; import type PopupWindow from "@/widgets/popupwindow"; import { execAsync, GLib, monitorFile, readFileAsync, writeFileAsync } from "astal"; import { App } from "astal/gtk3"; +import { initConfig, updateConfig } from "config"; -const loadStyleAsync = async () => { +export const loadStyleAsync = async () => { let schemeColours; if (GLib.file_test(`${STATE}/scheme/current.txt`, GLib.FileTest.EXISTS)) { const currentScheme = await readFileAsync(`${STATE}/scheme/current.txt`); @@ -33,6 +34,7 @@ App.start({ const now = Date.now(); loadStyleAsync().catch(console.error); monitorFile(`${STATE}/scheme/current.txt`, () => loadStyleAsync().catch(console.error)); + initConfig(); <Launcher />; <NotifPopups />; @@ -46,6 +48,7 @@ App.start({ requestHandler(request, res) { if (request === "quit") App.quit(); else if (request === "reload-css") loadStyleAsync().catch(console.error); + else if (request === "reload-config") updateConfig(); else if (request.startsWith("show")) App.get_window(request.split(" ")[1])?.show(); else if (request === "toggle sideleft") { const window = App.get_window("sideleft") as PopupWindow | null; |