🔧 chore(scripts/config): stop using singleton instance, add type declarations(for completion)

this will make easier to work with multiple configuration files at the same time
This commit is contained in:
retrozinndev
2025-08-03 15:02:36 -03:00
parent 7265a9ec1f
commit 1d5fe06f8a
7 changed files with 105 additions and 111 deletions
+5 -5
View File
@@ -1,14 +1,14 @@
import { Config } from "./config";
import { timeout } from "ags/time";
import { execAsync } from "ags/process";
import { readFile } from "ags/file";
import { generalConfig } from "../app";
import { onCleanup } from "ags";
import GObject, { getter, property, register, signal } from "ags/gobject";
import AstalNotifd from "gi://AstalNotifd";
import AstalIO from "gi://AstalIO";
import { onCleanup } from "ags";
import Gio from "gi://Gio?version=2.0";
import GLib from "gi://GLib?version=2.0";
import { readFile } from "ags/file";
export interface HistoryNotification {
@@ -53,7 +53,7 @@ class Notifications extends GObject.Object {
this.#connections.push(
AstalNotifd.get_default().connect("notified", (notifd, id) => {
const notification = notifd.get_notification(id);
const notifTimeout = Config.getDefault().getProperty(
const notifTimeout = generalConfig.getProperty(
`notifications.timeout_${this.getUrgencyString(notification.urgency).toLowerCase()}`,
"number") as number;