-
-
Save eddnav/fd140149f07d85f9903c to your computer and use it in GitHub Desktop.
srid99's bash script for IntelliJ IDEA desktop entry with a bit of Marketing hah!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Run this script from your '/.../intellij-location/bin' directory. | |
# Application name | |
APPLICATION=intellij-idea | |
# Application path | |
APPLICATION_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | |
# Make application exeuctable | |
echo "Installing to /usr/bin folder, requires permission..." | |
sudo ln -nsf $APPLICATION_PATH/idea.sh /usr/bin/$APPLICATION | |
echo "" | |
# Create desktop entry | |
FILE_DESKTOP=$APPLICATION.desktop | |
touch $FILE_DESKTOP | |
echo "[Desktop Entry]" >> $FILE_DESKTOP | |
echo "Type=Application" >> $FILE_DESKTOP | |
echo "Encoding=UTF-8" >> $FILE_DESKTOP | |
echo "Name=IntelliJ IDEA" >> $FILE_DESKTOP | |
echo "GenericName=IDEA" >> $FILE_DESKTOP | |
echo "Comment=The Best Java & Polyglot IDE" >> $FILE_DESKTOP | |
echo "StartupWMClass=jetbrains-idea" >> $FILE_DESKTOP | |
echo "Exec=$APPLICATION" >> $FILE_DESKTOP | |
echo "Icon=intellij-idea-ultimate-edition" >> $FILE_DESKTOP | |
echo "Categories=Development;Utilities;TextEditor;IDE" >> $FILE_DESKTOP | |
echo "Terminal=false" >> $FILE_DESKTOP | |
echo "Installing to Applications menu" | |
xdg-desktop-menu install $FILE_DESKTOP | |
xdg-desktop-menu forceupdate | |
echo "" | |
echo "Cleaning" | |
rm $FILE_DESKTOP | |
echo "" | |
echo "$APPLICATION now has a desktop entry!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment