import { App } from "astal"; import GObject, { register, property, signal } from "astal/gobject"; import { Sway } from "./ipc"; import * as types from "./types"; @register({ GTypeName: "SwayService", }) export class SwayService extends GObject.Object { private static #instance: SwayService; private constructor() { // Initialize the IPC and register event listeners Sway.get_default(); } public static get_default(): SwayService { if (!SwayService.#instance) { SwayService.#instance = new SwayService(); } return SwayService.#instance; } private #onWorkspaceEvent(event: types.WorkspaceEvent) {} }