add dolphin services menu
This commit is contained in:
parent
cd6fe73b8e
commit
f7a4fc0d8d
7 changed files with 71 additions and 52 deletions
|
|
@ -1,10 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Service
|
||||
ServiceTypes=KonqPopupMenu/Plugin
|
||||
MimeType=all/allfiles;
|
||||
Actions=CopyPublicURL
|
||||
|
||||
[Desktop Action CopyPublicURL]
|
||||
Name=Copy location as URL
|
||||
Icon=org.kde.plasma.clipboard
|
||||
Exec=/etc/nixos/scripts/copy-public-url.sh "%F"
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Service
|
||||
ServiceTypes=KonqPopupMenu/Plugin
|
||||
MimeType=inode/directory
|
||||
Actions=RunGhosttyDir
|
||||
|
||||
[Desktop Action RunGhosttyDir]
|
||||
Name=Open Ghostty here
|
||||
Icon=com.mitchellh.ghostty
|
||||
Exec=ghostty +new-window --working-directory="%F"
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Service
|
||||
ServiceTypes=KonqPopupMenu/Plugin
|
||||
MimeType=inode/directory
|
||||
Actions=RunCodeDir
|
||||
|
||||
[Desktop Action RunCodeDir]
|
||||
Name=Open with Antigravity
|
||||
Icon=antigravity
|
||||
Exec=antigravity %F
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Service
|
||||
ServiceTypes=KonqPopupMenu/Plugin
|
||||
MimeType=inode/directory
|
||||
Actions=RunCodeDir
|
||||
|
||||
[Desktop Action RunCodeDir]
|
||||
Name=Open with Code
|
||||
Icon=vscode
|
||||
Exec=code %F
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Service
|
||||
ServiceTypes=KonqPopupMenu/Plugin
|
||||
MimeType=inode/directory
|
||||
Actions=RunCodeDir
|
||||
|
||||
[Desktop Action RunCodeDir]
|
||||
Name=Open with Nvim
|
||||
Icon=nvim
|
||||
Exec=ghostty +new-window --working-directory="~/.config" -e nvim .
|
||||
|
|
@ -14,6 +14,65 @@
|
|||
Exec = "${libs.root "/scripts/copy-public-url.sh"} \"%F\"";
|
||||
};
|
||||
};
|
||||
|
||||
open-ghostty-here = {
|
||||
"Desktop Entry" = {
|
||||
Type = "Service";
|
||||
ServiceTypes = "KonqPopupMenu/Plugin";
|
||||
MimeType = "inode/directory";
|
||||
Actions = "RunGhosttyDir";
|
||||
};
|
||||
"Desktop Action RunGhosttyDir" = {
|
||||
Name = "Open Ghostty here";
|
||||
Icon = "com.mitchellh.ghostty";
|
||||
Exec = "ghostty +new-window --working-directory=\"%F\"";
|
||||
};
|
||||
};
|
||||
|
||||
open-with-antigravity = {
|
||||
"Desktop Entry" = {
|
||||
Type = "Service";
|
||||
ServiceTypes = "KonqPopupMenu/Plugin";
|
||||
MimeType = "inode/directory";
|
||||
Actions = "RunCodeDir";
|
||||
};
|
||||
|
||||
"Desktop Action RunCodeDir" = {
|
||||
Name = "Open with Antigravity";
|
||||
Icon = "antigravity";
|
||||
Exec = "antigravity \"%F\"";
|
||||
};
|
||||
};
|
||||
|
||||
open-with-code = {
|
||||
"Desktop Entry" = {
|
||||
Type = "Service";
|
||||
ServiceTypes = "KonqPopupMenu/Plugin";
|
||||
MimeType = "inode/directory";
|
||||
Actions = "RunCodeDir";
|
||||
};
|
||||
|
||||
"Desktop Action RunCodeDir" = {
|
||||
Name = "Open with Code";
|
||||
Icon = "vscode";
|
||||
Exec = "vscode \"%F\"";
|
||||
};
|
||||
};
|
||||
|
||||
open-with-nvim = {
|
||||
"Desktop Entry" = {
|
||||
Type = "Service";
|
||||
ServiceTypes = "KonqPopupMenu/Plugin";
|
||||
MimeType = "inode/directory";
|
||||
Actions = "RunCodeDir";
|
||||
};
|
||||
|
||||
"Desktop Action RunCodeDir" = {
|
||||
Name = "Open with Nvim";
|
||||
Icon = "nvim";
|
||||
Exec = "ghostty +new-window --working-directory=\"~/.config\" -e nvim .";
|
||||
};
|
||||
};
|
||||
};
|
||||
configs = {
|
||||
General = {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,17 @@ in {
|
|||
force = true;
|
||||
};
|
||||
}
|
||||
# (lib.attrsToList config.programs.dolphin.services-menu)z
|
||||
(builtins.listToAttrs (builtins.map
|
||||
({
|
||||
name,
|
||||
value,
|
||||
}: {
|
||||
name = ".local/share/kio/servicemenus/${name}.desktop";
|
||||
value = {
|
||||
text = lib.generators.toINI {} value;
|
||||
};
|
||||
})
|
||||
(lib.attrsToList config.programs.dolphin.services-menu)))
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -415,7 +425,7 @@ in {
|
|||
};
|
||||
|
||||
services-menu = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
type = lib.types.attrsOf (lib.types.attrsOf (lib.types.attrsOf lib.types.str));
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Reference in a new issue