Last active
July 17, 2026 19:45
-
-
Save lukaszjablonski/751ab785cfd08db1f8d262d62afabba2 to your computer and use it in GitHub Desktop.
Install custom "Show Applications" launcher in Ubuntu
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
| #!/bin/bash | |
| # Install custom "Show Applications" launcher in Ubuntu | |
| # Based on | |
| # https://github.com/milanify/Ubuntu-Launchpad | |
| echo "Installing Show Applications launcher..." | |
| DESKTOP_FILE="/usr/share/applications/show-apps-launcher.desktop" | |
| # Create .desktop file | |
| sudo tee "$DESKTOP_FILE" > /dev/null << 'EOF' | |
| [Desktop Entry] | |
| Name=Show Applications | |
| Comment=Open all installed applications | |
| Exec=bash -c "xdotool keydown Super key a; sleep 0.1; xdotool keyup Super" | |
| Icon=view-app-grid-symbolic | |
| Terminal=false | |
| Type=Application | |
| Categories=Utility; | |
| StartupNotify=false | |
| X-GNOME-UsesNotifications=false | |
| EOF | |
| # Make .desktop file executable | |
| sudo chmod 644 "$DESKTOP_FILE" | |
| sudo chown root:root "$DESKTOP_FILE" | |
| # Install xdotool | |
| sudo apt update | |
| sudo apt install -y xdotool | |
| # Pin to dock (if using Dash to Dock) | |
| DESKTOP_ID="show-apps-launcher.desktop" | |
| current=$(gsettings get org.gnome.shell favorite-apps) | |
| if [[ "$current" != *"$DESKTOP_ID"* ]]; then | |
| new=$(echo "$current" | sed "s/]$/, '$DESKTOP_ID']/") | |
| gsettings set org.gnome.shell favorite-apps "$new" | |
| fi | |
| # Refresh the desktop database so GNOME picks up the new .desktop file immediately | |
| sudo update-desktop-database /usr/share/applications | |
| # Restart shell | |
| echo "Restarting GNOME Shell (X11 only)..." | |
| if [ "$XDG_SESSION_TYPE" = "x11" ]; then | |
| killall -3 gnome-shell | |
| else | |
| echo "You're on Wayland — please log out and log back in to see the icon." | |
| fi | |
| echo "The 'Show Applications' launcher is installed and pinned to the dock." |
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
| #!/bin/bash | |
| # Uninstall custom "Show Applications" launcher in Ubuntu | |
| echo "Uninstalling Show Applications launcher..." | |
| DESKTOP_FILE="/usr/share/applications/show-apps-launcher.desktop" | |
| DESKTOP_ID="show-apps-launcher.desktop" | |
| # Remove from favorite-apps (dock pinning) | |
| echo "Removing from dock favorites..." | |
| current=$(gsettings get org.gnome.shell favorite-apps) | |
| if [[ "$current" == *"$DESKTOP_ID"* ]]; then | |
| # Remove the entry, handling commas/spacing cleanly | |
| new=$(echo "$current" | sed -E "s/, *'$DESKTOP_ID'//; s/'$DESKTOP_ID', *//; s/'$DESKTOP_ID'//") | |
| gsettings set org.gnome.shell favorite-apps "$new" | |
| echo "Removed '$DESKTOP_ID' from favorite-apps." | |
| else | |
| echo "'$DESKTOP_ID' not found in favorite-apps, skipping." | |
| fi | |
| # Remove the .desktop file | |
| if [ -f "$DESKTOP_FILE" ]; then | |
| sudo rm -f "$DESKTOP_FILE" | |
| echo "Removed $DESKTOP_FILE" | |
| else | |
| echo "$DESKTOP_FILE not found, skipping." | |
| fi | |
| # Also clean up old user-level desktop file, if it still exists from earlier attempts | |
| rm -f ~/.local/share/applications/show-apps-launcher.desktop | |
| # Refresh desktop database | |
| sudo update-desktop-database /usr/share/applications | |
| # Restart GNOME Shell (X11 only) | |
| echo "Restarting GNOME Shell..." | |
| if [ "$XDG_SESSION_TYPE" = "x11" ]; then | |
| killall -3 gnome-shell | |
| else | |
| echo "You're on Wayland — please log out and log back in for the dock to update." | |
| fi | |
| # Optionally remove xdotool | |
| read -p "Do you also want to remove xdotool? (y/N): " remove_xdotool | |
| if [[ "$remove_xdotool" =~ ^[Yy]$ ]]; then | |
| sudo apt remove -y xdotool | |
| echo "xdotool removed." | |
| else | |
| echo "Keeping xdotool installed." | |
| fi | |
| echo "Uninstall complete. The 'Show Applications' launcher has been removed." |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To install it directly from this gist run in Terminal:
curl -fsSL https://gist.github.com/lukaszjablonski/751ab785cfd08db1f8d262d62afabba2/raw/0141a5f4784bd312ef09057f2137a9b566a1d6e5/install-show-apps-launcher.sh -o install-show-apps-launcher.shchmod +x install-show-apps-launcher.sh./install-show-apps-launcher.shrm install-show-apps-launcher.sh