import * as Astal 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 { static _instance: SwayService; constructor() { super(); // Initialize the IPC and register event listeners Sway.instance; } public static get instance(): SwayService { if (!SwayService._instance) { SwayService._instance = new SwayService(); } return SwayService._instance; } #onWorkspaceEvent(event: types.WorkspaceEvent) {} }