Skip to content

Instantly share code, notes, and snippets.

@trzecieu
Created December 3, 2018 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trzecieu/8b05f75475c4c30967ecf1850c33393f to your computer and use it in GitHub Desktop.
Save trzecieu/8b05f75475c4c30967ecf1850c33393f to your computer and use it in GitHub Desktop.
VS code *.desktop files
#/usr/share/applications/code-url-handler.desktop
[Desktop Entry]
Name=Visual Studio Code - URL Handler
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --open-url %U
Icon=code
Type=Application
NoDisplay=true
StartupNotify=true
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=x-scheme-handler/vscode;
Keywords=vscode;
#/usr/share/applications/code.desktop
[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --unity-launch %F
Icon=code
Type=Application
StartupNotify=true
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-empty-window;
Keywords=vscode;
[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/share/code/code --new-window %F
Icon=code
#~/.local/share/applications/code.desktop
[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --unity-launch %F
Icon=vscode
Type=Application
StartupNotify=true
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-empty-window;
Keywords=vscode;
[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/share/code/code --new-window %F
Icon=vscode
# PATCH TO /usr/share/applications/mimeinfo.cache
[MIME Cache]
x-scheme-handler/vscode=code-url-handler.desktop;
inode/directory=code.desktop;org.gnome.Nautilus.desktop;org.gnome.baobab.desktop;
text/plain=org.gnome.gedit.desktop;gvim.desktop;nvim.desktop;code.desktop;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment