Last active
October 25, 2016 09:03
-
-
Save ydomenjoud/2deb393e3381c99bce81f17bb35a7c0b to your computer and use it in GitHub Desktop.
create deezer desktop app on kubuntu
This file contains 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
#!/bin/sh | |
################################### | |
# create deezer desktop app | |
# work on kubuntu 16.04 | |
################################### | |
application_dir=$HOME/.local/share/applications/ | |
icon_dir=$HOME/.local/share/icons/hicolor/256x256/app/ | |
icon_name=deezer.png | |
shortcut_name=deezer.desktop | |
echo -n '\033[0;36m' | |
# create required dir | |
echo "creating $icon_dir" | |
mkdir -p $icon_dir | |
echo "creating $application_dir" | |
mkdir -p $application_dir | |
# download icon | |
wget -q -O $icon_dir$icon_name http://savingti.me/2016/10/25/deezer.png | |
# create shortcut | |
echo "creating $application_dir$shortcut_name" | |
cat > $application_dir$shortcut_name <<EOL | |
#!/usr/bin/env xdg-open | |
[Desktop Entry] | |
Version=1.0 | |
Terminal=false | |
Type=Application | |
Name=Deezer via Chromium | |
Exec=/usr/bin/google-chrome --app=http://www.deezer.com/ | |
Icon=$icon_dir$icon_name | |
StartupWMClass=www.deezer.com | |
EOL | |
# exec | |
echo "add execution right on $application_dir$shortcut_name" | |
chmod +x $application_dir/$shortcut_name | |
# end | |
echo "\033[0;32minstallation success, check dir file://$application_dir , you should see a deezer.desktop shortcut than you can drag and drop on dashboard, desktop, etc \033[0m" | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment