From efb483e1c922bbe56c5e7c5b0eef3041302fbe7b Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Sat, 12 Apr 2025 18:05:30 -0300 Subject: [PATCH] :recycle: ags(app): stuff --- ags/app.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ags/app.ts b/ags/app.ts index 82558f7..ff9ea70 100644 --- a/ags/app.ts +++ b/ags/app.ts @@ -1,3 +1,5 @@ +import AstalNotifd from "gi://AstalNotifd"; + import { App } from "astal/gtk3" import { Wireplumber } from "./scripts/volume"; @@ -14,17 +16,13 @@ import { PluginWebSearch } from "./runner/plugins/websearch"; import { PluginMedia } from "./runner/plugins/media"; import { Windows } from "./windows"; import { Notifications } from "./scripts/notifications"; -import AstalNotifd from "gi://AstalNotifd"; import { GObject } from "astal"; -const defaultWindows: Array = [ - "bar" -]; - let osdTimer: (Time|undefined); let connections = new Map | number)>(); +const defaultWindows: Array = [ "bar" ]; const runnerPlugins: Array = [ PluginApps, PluginShell, @@ -34,12 +32,12 @@ const runnerPlugins: Array = [ App.start({ instanceName: "astal", - async requestHandler(request: string, response: (result: any) => void) { - // console.log(`[LOG] Arguments received: ${request}`); + requestHandler: async (request: string, response: (result: any) => void): Promise => { response(await handleArguments(request)); }, - main() { + main: (..._args: Array) => { console.log(`[LOG] Initialized astal instance as: ${ App.instanceName || "astal" }`); + App.vfunc_dispose = () => { console.log("[LOG] Disconnecting stuff"); connections.forEach((v, k) => Array.isArray(v) ? @@ -47,7 +45,8 @@ App.start({ : k.disconnect(v)); }; - console.log(`[LOG] Running Stylesheet handler`); + + console.log("[LOG] Running Stylesheet handler"); runStyleHandler();