♻️ ags(runner): organize files separately from the main shell stuff
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user