♻️ ags(runner): organize files separately from the main shell stuff

This commit is contained in:
retrozinndev
2025-03-12 22:11:18 -03:00
parent 65143468c5
commit 52cfd114d7
13 changed files with 62 additions and 109 deletions
+18
View File
@@ -0,0 +1,18 @@
import { ResultWidget, ResultWidgetProps } from "../../widget/runner/ResultWidget";
import AstalHyprland from "gi://AstalHyprland";
import { GLib } from "astal";
import { Runner } from "../Runner";
export const PluginShell = {
prefix: '!',
handle: (command: string): ResultWidget => {
const shell = GLib.getenv("SHELL") || "/usr/bin/env sh";
return new ResultWidget({
onClick: () => AstalHyprland.get_default().dispatch("exec", `${shell} -c "${command}"`),
title: `Run: \`${command}\``,
description: shell,
icon: "utilities-terminal-symbolic"
} as ResultWidgetProps)
}
} as Runner.Plugin;