feat(runner/plugin-kill): add plugin to quickly kill hyprland clients

This commit is contained in:
retrozinndev
2025-09-14 10:25:56 -03:00
parent a28ac3cd3e
commit 206880cb51
3 changed files with 24 additions and 2 deletions
+3 -1
View File
@@ -9,7 +9,8 @@ import {
PluginMedia,
PluginShell,
PluginWallpapers,
PluginWebSearch
PluginWebSearch,
PluginKill
} from "./runner/plugins";
import { Wireplumber } from "./modules/volume";
import { handleArguments } from "./modules/arg-handler";
@@ -40,6 +41,7 @@ const runnerPlugins: Array<Runner.Plugin> = [
PluginApps,
PluginShell,
PluginWebSearch,
PluginKill,
PluginMedia,
PluginWallpapers,
PluginClipboard
+3 -1
View File
@@ -4,6 +4,7 @@ import { PluginMedia } from "./media"
import { PluginShell } from "./shell"
import { PluginWallpapers } from "./wallpapers"
import { PluginWebSearch } from "./websearch"
import { PluginKill } from "./kill"
export {
@@ -12,5 +13,6 @@ export {
PluginClipboard,
PluginShell,
PluginMedia,
PluginWallpapers
PluginWallpapers,
PluginKill
};
+18
View File
@@ -0,0 +1,18 @@
import { execAsync } from "ags/process";
import { Runner } from "../Runner";
import { Notifications } from "../../modules/notifications";
export const PluginKill = {
prefix: ":k",
handle: () => ({
title: "Select a client to kill",
closeOnClick: true,
icon: "window-close-symbolic",
actionClick: () => execAsync("hyprctl kill").catch((e) =>
Notifications.getDefault().sendNotification({
summary: "Couldn't kill client",
body: `An error occurred while trying to kill a client! Stderr: ${e}`
})
)
} satisfies Runner.Result)
} satisfies Runner.Plugin;