From 2be44b8739573121106f9689d98b47fa3527af09 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Sat, 18 Jan 2025 00:33:24 +1100
Subject: quit request

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

(limited to 'app.tsx')

diff --git a/app.tsx b/app.tsx
index 3bebad0..5fc82fc 100644
--- a/app.tsx
+++ b/app.tsx
@@ -35,7 +35,8 @@ App.start({
         console.log(`Caelestia started in ${Date.now() - now}ms`);
     },
     requestHandler(request, res) {
-        if (request === "reload css") loadStyleAsync().catch(console.error);
+        if (request === "quit") App.quit();
+        else if (request === "reload css") loadStyleAsync().catch(console.error);
         else if (request.startsWith("show")) App.get_window(request.split(" ")[1])?.show();
         else if (request === "media play pause") Players.get_default().lastPlayer?.play_pause();
         else if (request === "media next") Players.get_default().lastPlayer?.next();
-- 
cgit v1.2.3-freya

