Add steam straight to dock if selected

This commit is contained in:
David Heinemeier Hansson
2024-06-13 20:45:31 +02:00
parent 665a33c504
commit 6aeee7fbff
2 changed files with 1 additions and 16 deletions

View File

@@ -4,19 +4,3 @@ sudo apt install -y ./steam.deb
sudo apt-get install --no-remove -oAPT::Get::AutomaticRemove=false libc6:amd64 libc6:i386 libegl1:amd64 libegl1:i386 libgbm1:amd64 libgbm1:i386 libgl1-mesa-dri:amd64 libgl1-mesa-dri:i386 libgl1:amd64 libgl1:i386 steam-libs-amd64:amd64
rm steam.deb
cd -
# Add steam to dock
new_app="steam.desktop"
current_favorites=$(gsettings get org.gnome.shell favorite-apps)
# Check if the new app is already in the list
if [[ "$current_favorites" == *"$new_app"* ]]; then
echo "App already exists in favorites."
exit 0
fi
# Remove the closing bracket from the current favorites list
current_favorites_trimmed=$(echo $current_favorites | sed "s/]//")
new_favorites_list="${current_favorites_trimmed}, '${new_app}']"
gsettings set org.gnome.shell favorite-apps "$new_favorites_list"

View File

@@ -10,6 +10,7 @@ apps=(
"Zoom.desktop"
"pinta_pinta.desktop"
"com.github.xournalpp.xournalpp.desktop"
"steam.desktop"
"1password.desktop"
"org.gnome.Settings.desktop"
"org.gnome.Nautilus.desktop"