Skip to content

Instantly share code, notes, and snippets.

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 coppolat1/ac7560b056e16c44ebeeb151cca75abe to your computer and use it in GitHub Desktop.
Save coppolat1/ac7560b056e16c44ebeeb151cca75abe to your computer and use it in GitHub Desktop.
My Nemo Actions
[Nemo Action]
# Open the selected directory as a folder in VScode.
# Trigger: Right-click any folder to open as a VScode folder.
# https://wiki.archlinux.org/index.php/Nemo
# https://github.com/linuxmint/nemo/blob/master/files/usr/share/nemo/actions/sample.nemo_action
Name=Open folder in VS Code
Comment=Open selected folder in Visual Studio Code
Icon-Name=com.visualstudio.code
Selection=s
Extensions=dir
EscapeSpaces=true
Exec=/bin/sh -c "code %F"
Dependencies=code;
[Nemo Action]
# Open the current directory as a folder in VScode.
# Trigger: Right-click anywhere *in* a directory to open as a VScode folder.
# https://wiki.archlinux.org/index.php/Nemo
# https://github.com/linuxmint/nemo/blob/master/files/usr/share/nemo/actions/sample.nemo_action
Name=Open folder in VS Code
Comment=Open current folder in Visual Studio Code
Icon-Name=com.visualstudio.code
Selection=none
Extensions=any
EscapeSpaces=true
Exec=/bin/sh -c "code %P"
Dependencies=code;
@coppolat1
Copy link
Author

These are custom context menu items for the Nemo file explorer. They should be placed in /usr/share/nemo/actions for all users or ~/.local/share/nemo/actions for a single user.

vscode-folder-dir.nemo_action is for when you right click on a folder.
vscode-folder-none.nemo_action is for when you right click empty space in a directory.

They are named the same, so the user cannot tell the difference in which case they are using.

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