2024-10-31 15:39:18 -06:00

26 lines
643 B
TypeScript

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) {}
}