From d9d12acb58e2b97deb8c7a657aee829ac0593d39 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Sat, 18 Jan 2025 15:02:50 +1100
Subject: app: monitor scheme file

---
 app.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'app.tsx')

diff --git a/app.tsx b/app.tsx
index e995182..46bc1a1 100644
--- a/app.tsx
+++ b/app.tsx
@@ -1,4 +1,4 @@
-import { execAsync, GLib, readFileAsync, writeFileAsync } from "astal";
+import { execAsync, GLib, monitorFile, readFileAsync, writeFileAsync } from "astal";
 import { App } from "astal/gtk3";
 import Bar from "./src/modules/bar";
 import Launcher from "./src/modules/launcher";
@@ -25,6 +25,7 @@ App.start({
     main() {
         const now = Date.now();
         loadStyleAsync().catch(console.error);
+        monitorFile(`${CACHE}/scheme/current.txt`, () => loadStyleAsync().catch(console.error));
 
         <Launcher />;
         <NotifPopups />;
-- 
cgit v1.2.3-freya

