Skip to content

Instantly share code, notes, and snippets.

@GaussianWonder
Last active January 17, 2022 09:27
Show Gist options
  • Save GaussianWonder/df6882935b04f5397134c90802d13aa4 to your computer and use it in GitHub Desktop.
Save GaussianWonder/df6882935b04f5397134c90802d13aa4 to your computer and use it in GitHub Desktop.
OpenFolder and OpenFile(s) context menu options for kde's file manager DOLPHIN
[Desktop Entry]
Type=Service
Icon=com.visualstudio.code
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=text/plain;
Actions=openFilesInVSCode;
Encoding=UTF-8
X-KDE-AuthorizeAction=shell_access
[Desktop Action openFilesInVSCode]
Name=OpenFile(s) in VSCode
Icon=com.visualstudio.code
Exec=code %f
[Desktop Entry]
Type=Service
Icon=com.visualstudio.code
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory;
Actions=openFolderInVSCode;
Encoding=UTF-8
X-KDE-AuthorizeAction=shell_access
[Desktop Action openFolderInVSCode]
Name=OpenFolder in VSCode
Icon=com.visualstudio.code
Exec=code %f
@GaussianWonder
Copy link
Author

Place these files inside the ServiceMenu directory from within

kf5-config --path services

This is almost redundant since you can always OpenWith -> VSCode and it works for both MimeTypes targeted here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment