Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- #Variables
- MIMESA="$HOME/.local/share/applications/mimeapps.list"
- MIMESL=$(cat $HOME/.local/share/applications/mimeapps.list | grep "x-scheme-handler/steam=steam.desktop")
- MIMESC="$HOME/.local/share/mime"
- #Steam Desktop Entry
- echo '[Desktop Entry]
- Name=Steam
- Comment=Application for managing and playing games on Steam
- Comment[es]=Aplicación para administrar y ejecutar juegos en Steam
- Exec=/usr/bin/steam %U
- Icon=steam
- Terminal=false
- Type=Application
- Categories=Network;FileTransfer;Game;
- MimeType=x-scheme-handler/steam;
- Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends;
- [Desktop Action Store]
- Name=Store
- Name[es]=Tienda
- Exec=steam steam://store
- [Desktop Action Community]
- Name=Community
- Name[es]=Comunidad
- Exec=steam steam://url/SteamIDControlPage
- [Desktop Action Library]
- Name=Library
- Name[es]=Biblioteca
- Exec=steam steam://open/games
- [Desktop Action Servers]
- Name=Servers
- Name[es]=Servidores
- Exec=steam steam://open/servers
- [Desktop Action Screenshots]
- Name=Screenshots
- Name[es]=Capturas
- Exec=steam steam://open/screenshots
- [Desktop Action News]
- Name=News
- Name[es]=Noticias
- Exec=steam steam://open/news
- [Desktop Action Settings]
- Name=Settings
- Name[es]=Parámetros
- Exec=steam steam://open/settings
- [Desktop Action BigPicture]
- Name=Big Picture
- Exec=steam steam://open/bigpicture
- [Desktop Action Friends]
- Name=Friends
- Name[es]=Amigos
- Exec=steam steam://open/friends' | tee "$HOME/.local/share/applications/steam.desktop" &> /dev/null
- #Let the all users read & execute that desktop entry
- chmod a+o+x "$HOME/.local/share/applications/steam.desktop
- #Add the protocol handler to the user local settings
- sed -i '/\[Default Applications\]/a x-scheme-handler/steam=steam.desktop' "$MIMESA"
- #Update the mime database
- update-mime-database $MIMESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement