added right click action for plasma

This commit is contained in:
Andrej Daskalov
2024-11-28 23:33:35 +01:00
parent 873ebc368c
commit 62fe3eb652
2 changed files with 18 additions and 0 deletions

View File

@ -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");

11
dist/linux/ghostty_dolphin.desktop vendored Normal file
View File

@ -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