-
-
Save roman-yagodin/9d4ad8a99d5b7649b66f to your computer and use it in GitHub Desktop.
[Nemo Action] | |
# https://wiki.archlinux.org/index.php/Nemo | |
# https://github.com/linuxmint/nemo/blob/master/files/usr/share/nemo/actions/sample.nemo_action | |
Name=Open in VS Code | |
Name[ru]=Открыть в VS Code | |
Comment=Open current folder in Visual Studio Code | |
Comment[ru]=Открыть текущую папку в Visual Studio Code | |
Icon-Name=com.visualstudio.code | |
Selection=none | |
Extensions=any; | |
#Quote=double | |
EscapeSpaces=true | |
Exec=code %P | |
Dependencies=code; |
[Nemo Action] | |
# https://wiki.archlinux.org/index.php/Nemo | |
# https://github.com/linuxmint/nemo/blob/master/files/usr/share/nemo/actions/sample.nemo_action | |
Name=Open in VS Code | |
Name[ru]=Открыть в VS Code | |
Comment=Open selected folder in Visual Studio Code | |
Comment[ru]=Открыть выбранную папку в Visual Studio Code | |
Icon-Name=com.visualstudio.code | |
Selection=s | |
Extensions=dir; | |
#Quote=double | |
EscapeSpaces=true | |
Exec=code %P/%f | |
Dependencies=code; |
The icon wouldn't load for me. I took a look in /usr/share/applications/code.desktop to see how it referenced the icon. I changed the line:
Icon-Name=code
to Icon-Name=com.visualstudio.code
and it worked!
It could be also visual-studio-code
or visual-studio-code-insiders
for Insiders build right now.
I should also note that where is no real need to have Nemo action to open folder in VSCode now, as it is already a recommended application to open folders:
From the /usr/share/applications/code.desktop
:
MimeType=text/plain;inode/directory;
You're right I didn't think of that. Although it is an extra click (or hover) to get to it: Right Click on a folder -> Open With -> Visual Studio Code
If you check out my fork, I also added another nemo action so that you can right click in a directory and it will open that directory as a folder in VSCode.
Yes, two actions would be better for this case, than just one - currently there is no way to combine different types of selections in one action, AFAIK.
Updated gist, also simplified Exec
lines - looks like /bin/sh
part is not necessary now.
It should be placed under~/.local/share/nemo/actions
. Note that the code is old - I think I should post a newer version.Answered wrong question at first, sorry! The custom icon should be placed in
~/.local/share/icons
(or, globally, in the/usr/share/icons
).