Skip to content

Instantly share code, notes, and snippets.

@lukaszjablonski
Last active July 17, 2026 19:45
Show Gist options
  • Select an option

  • Save lukaszjablonski/751ab785cfd08db1f8d262d62afabba2 to your computer and use it in GitHub Desktop.

Select an option

Save lukaszjablonski/751ab785cfd08db1f8d262d62afabba2 to your computer and use it in GitHub Desktop.
Install custom "Show Applications" launcher in Ubuntu
#!/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."
#!/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."
@lukaszjablonski

lukaszjablonski commented Jul 17, 2026

Copy link
Copy Markdown
Author

To install it directly from this gist run in Terminal:

  1. curl -fsSL https://gist.github.com/lukaszjablonski/751ab785cfd08db1f8d262d62afabba2/raw/0141a5f4784bd312ef09057f2137a9b566a1d6e5/install-show-apps-launcher.sh -o install-show-apps-launcher.sh
  2. chmod +x install-show-apps-launcher.sh
  3. ./install-show-apps-launcher.sh
  4. rm install-show-apps-launcher.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment