summaryrefslogtreecommitdiff
path: root/app.tsx
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-03-05 00:13:43 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-03-05 11:41:20 +1100
commit9d1ee02d2ebd3a0984e24381381289f629b42737 (patch)
treec894f493e98a6fe408f7e25ebafff0889bf963e0 /app.tsx
parentlauncher: allow disabling actions (diff)
downloadcaelestia-shell-9d1ee02d2ebd3a0984e24381381289f629b42737.tar.gz
caelestia-shell-9d1ee02d2ebd3a0984e24381381289f629b42737.tar.bz2
caelestia-shell-9d1ee02d2ebd3a0984e24381381289f629b42737.zip
app: init services after timeout
Prevent's startup delay on slower machines (yes, even with idle)
Diffstat (limited to 'app.tsx')
-rw-r--r--app.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/app.tsx b/app.tsx
index cc5e41b..acb50fa 100644
--- a/app.tsx
+++ b/app.tsx
@@ -10,7 +10,7 @@ import Players from "@/services/players";
import Schemes from "@/services/schemes";
import Wallpapers from "@/services/wallpapers";
import type PopupWindow from "@/widgets/popupwindow";
-import { execAsync, idle, writeFileAsync } from "astal";
+import { execAsync, idle, timeout, writeFileAsync } from "astal";
import { App } from "astal/gtk3";
import { initConfig, updateConfig } from "config";
@@ -41,8 +41,10 @@ App.start({
<Popdowns />;
// Init services
- idle(() => Schemes.get_default());
- idle(() => Wallpapers.get_default());
+ timeout(1000, () => {
+ idle(() => Schemes.get_default());
+ idle(() => Wallpapers.get_default());
+ });
console.log(`Caelestia started in ${Date.now() - now}ms`);
},