From 49cdf5d5e010c9abb9b02034999eef2f49f066b9 Mon Sep 17 00:00:00 2001 From: Aylur Date: Sat, 31 Aug 2024 22:54:33 +0000 Subject: add icons option to App.start --- gjs/index.ts | 7 ------- gjs/src/application.ts | 6 +++++- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'gjs') diff --git a/gjs/index.ts b/gjs/index.ts index f5c35a6..901b264 100644 --- a/gjs/index.ts +++ b/gjs/index.ts @@ -1,12 +1,5 @@ import { Gtk } from "./src/imports.js" -declare global { - const console: { - error(...args: any[]): void - log(...args: any[]): void - } -} - export * from "./src/imports.js" export * from "./src/process.js" export * from "./src/time.js" diff --git a/gjs/src/application.ts b/gjs/src/application.ts index 13927d8..0ba247e 100644 --- a/gjs/src/application.ts +++ b/gjs/src/application.ts @@ -5,6 +5,7 @@ type RequestHandler = { } type Config = Partial<{ + icons: string instanceName: string gtkTheme: string iconTheme: string @@ -64,7 +65,7 @@ class AstalJS extends Astal.Application { exit(code ?? 0) } - start({ requestHandler, css, hold, main, client, ...cfg }: Config = {}) { + start({ requestHandler, css, hold, main, client, icons, ...cfg }: Config = {}) { client ??= () => { print(`Astal instance "${this.instanceName}" already running`) exit(1) @@ -90,6 +91,9 @@ class AstalJS extends Astal.Application { if (css) this.apply_css(css, false) + if (icons) + this.add_icons(icons) + hold ??= true if (hold) this.hold() -- cgit v1.2.3