Create Nemo Action (Shortcut) - Open In PhpStorm
Related Posts
Steps
Create a new "actions file" for nemo in your hidden local share area.
editor /home/$USER/.local/share/nemo/actions/open_in_phpstorm.nemo_action
Fill it with the following content:
[Nemo Action]
Name=Open in PhpStorm
Comment=Open the selected folder in PhpStorm
Exec=/path/to/phpstorm "%F"
Icon-Name=phpstorm
Selection=any
Extensions=dir;
/path/to/phpstorm
to be wherever you placed the application.
Getting The Icon To Work
The PhpStorm icon will only show up if there is an icon with the name phpstorm
in your current selected icons theme (whose icons can be found within /usr/share/icons
).
The only icon theme I had on my system that had the PhpStorm icon, was the Papirus set (install instructions), which I didn't want to use.
Thus, I copied the icon from there into all of the subfolders of the ubuntu-mono-dark folder, which is the theme I do want to use. Then I force refreshed the icons.
Both of these steps can be done by executing the chain of commands below (assuming you have the Papirus icon set).
sudo cp /usr/share/icons/Papirus/16x16/apps/phpstorm.svg /usr/share/icons/ubuntu-mono-dark/apps/16/. \
&& sudo cp /usr/share/icons/Papirus/16x16/apps/phpstorm.svg /usr/share/icons/ubuntu-mono-dark/apps/22/. \
&& sudo cp /usr/share/icons/Papirus/16x16/apps/phpstorm.svg /usr/share/icons/ubuntu-mono-dark/apps/24/. \
&& sudo cp /usr/share/icons/Papirus/16x16/apps/phpstorm.svg /usr/share/icons/ubuntu-mono-dark/apps/48/. \
&& sudo update-icon-caches /usr/share/icons/*
IntelliJ IDEA
If you want to do the same thing with IntelliJ IDEA, then do:
editor /home/$USER/.local/share/nemo/actions/open_in_intellijidea.nemo_action
[Nemo Action]
Name=Open in IntelliJ IDEA
Comment=Open the selected folder in IntelliJ IDEA
Exec=/path/to/intellijidea "%F"
Icon-Name=intellij-idea
Selection=any
Extensions=dir;
References
First published: 27th July 2022