From 62fe3eb652f99437aa12448cbe24b0db149c924b Mon Sep 17 00:00:00 2001 From: Andrej Daskalov Date: Thu, 28 Nov 2024 23:33:35 +0100 Subject: [PATCH] added right click action for plasma --- build.zig | 7 +++++++ dist/linux/ghostty_dolphin.desktop | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 dist/linux/ghostty_dolphin.desktop diff --git a/build.zig b/build.zig index 15fed7ed6..2e36b7861 100644 --- a/build.zig +++ b/build.zig @@ -573,6 +573,13 @@ pub fn build(b: *std.Build) !void { b.installFile("dist/linux/app.desktop", "share/applications/com.mitchellh.ghostty.desktop"); } + // Right click menu action in case of Plasma desktop + if (env.get("DESKTOP_SESSION")) |desktop| { + if (std.mem.eql(u8, desktop, "plasma")) { + b.installFile("dist/linux/ghostty_dolphin.desktop", "share/kio/servicemenus/ghostty_dolphin.desktop"); + } + } + // Various icons that our application can use, including the icon // that will be used for the desktop. b.installFile("images/icons/icon_16x16.png", "share/icons/hicolor/16x16/apps/com.mitchellh.ghostty.png"); diff --git a/dist/linux/ghostty_dolphin.desktop b/dist/linux/ghostty_dolphin.desktop new file mode 100644 index 000000000..da46f6286 --- /dev/null +++ b/dist/linux/ghostty_dolphin.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=KonqPopupMenu/Plugin +MimeType=inode/directory +Actions=RunGhosttyDir + +[Desktop Action RunGhosttyDir] +Name=Open Ghostty Here +Icon=com.mitchellh.ghostty +Exec=cd %F && ghostty +