diff --git a/ags/app.ts b/ags/app.ts index 3dcf844..5665213 100644 --- a/ags/app.ts +++ b/ags/app.ts @@ -32,8 +32,8 @@ const runnerPlugins: Array = [ App.start({ instanceName: "astal", - requestHandler: async (request: string, response: (result: any) => void): Promise => { - response(await handleArguments(request)); + requestHandler: (request: string, response: (result: any) => void): void => { + response(handleArguments(request)); }, main: (..._args: Array) => { console.log(`[LOG] Initialized astal instance as: ${ App.instanceName || "astal" }`); diff --git a/ags/scripts/arg-handler.ts b/ags/scripts/arg-handler.ts index 6a891f7..f3e6e9a 100644 --- a/ags/scripts/arg-handler.ts +++ b/ags/scripts/arg-handler.ts @@ -5,10 +5,9 @@ import { restartInstance } from "./reload-handler"; import { startRunnerDefault } from "../runner/Runner"; import { showWorkspaceNumbers } from "../widget/bar/Workspaces"; import { timeout } from "astal"; -import { App } from "astal/gtk3"; -export async function handleArguments(request: string): Promise { +export function handleArguments(request: string): any { const args: Array = request.split(" "); switch(args[0]) { case "open": @@ -42,12 +41,6 @@ export async function handleArguments(request: string): Promise { } return "Showing numbers"; - case "c": - case "code": - const input = request.replace(args[0], "").trimStart(); - console.log(input); - return await (App.eval(input).then((v) => v).catch((r) => r)); - default: return "command not found! try checking help"; } @@ -171,7 +164,6 @@ Options: reload: creates a new astal instance and removes this one. volume: wireplumber volume controller, see "volume help". runner: open the application runner. - c, code [js]: runs provided js in args and returns result. show-ws-numbers: show or hide workspace numbers in bar. h, help: shows this help message.