Last active
June 1, 2016 00:32
-
-
Save rtancman/076ac19057930bf93b9b84e36250c9cd to your computer and use it in GitHub Desktop.
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 | |
# telegram | |
wget https://updates.tdesktop.com/tlinux/tsetup.0.9.42.tar.xz | |
tar xvfJ tsetup.0.9.42.tar.xz | |
mv Telegram/ /opt/telegram | |
rm -rf tsetup.0.9.42.tar.xz | |
#telegram image | |
wget https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Telegram_logo.svg/128px-Telegram_logo.svg.png | |
mv 128px-Telegram_logo.svg.png /opt/telegram/telegram128x128.png | |
# Add to applications list (thanks 4ndrej) | |
echo -e '' >> /opt/telegram/telegram.desktop; | |
sudo rm -rf /usr/share/applications/telegram.desktop | |
sudo ln -s /opt/telegram/telegram.desktop /usr/share/applications/telegram.desktop | |
# Add bin alias | |
sudo rm -rf /bin/telegram | |
sudo ln -s /opt/telegram/Telegram /bin/telegram | |
# Set the icon (thanks gcaracuel) | |
echo -e '[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=Telegram | |
GenericName=a new era of messaging | |
Exec=/opt/telegram/Telegram %F | |
Terminal=false | |
Icon=/opt/telegram/telegram128x128.png | |
Categories=Messenger; | |
StartupNotify=true | |
Actions=Window;Document; | |
[Desktop Action Window] | |
Name=New Window | |
Exec=/opt/telegram/Telegram -n | |
OnlyShowIn=Unity; | |
[Desktop Action Document] | |
Name=New File | |
Exec=/opt/telegram/Telegram --command new_file | |
OnlyShowIn=Unity;' >> /opt/telegram/telegram.desktop; | |
echo "" | |
echo "Telegram installed successfully!" | |
echo "Run with: telegram" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment