Skip to content

Instantly share code, notes, and snippets.

@ajsb85
Created December 19, 2024 18:49
Show Gist options
  • Save ajsb85/00c6e1c6c035b702402239cb84eb8ed8 to your computer and use it in GitHub Desktop.
Save ajsb85/00c6e1c6c035b702402239cb84eb8ed8 to your computer and use it in GitHub Desktop.
GNOME Shell Extensions Installer

GNOME Shell Extensions Installer

This script automates the installation of several popular GNOME Shell extensions. It uses the gnome-shell-extension-installer utility to download and install extensions directly from the GNOME Extensions Website.

Features

The script installs the following extensions:

  • apps-menu: Adds a GNOME 2.x style menu on the panel.
  • auto-move-windows: Automatically assigns windows to specific workspaces.
  • drive-menu: Provides a status menu for quickly unmounting and powering off external storage devices.
  • launch-new-instance: Ensures application icons always launch new instances.
  • light-style: Enables a light GNOME Shell theme while respecting system-wide dark preferences.
  • native-window-placement: Uses a layout algorithm for window thumbnails reflecting actual positions and sizes.
  • places-menu: Adds a status indicator for navigating system places.
  • screenshot-window-sizer: Provides a shortcut for resizing windows for screenshots.
  • status-icons: Displays XEmbed status icons in the top bar.
  • system-monitor: Shows system resource usage in the top bar.
  • user-theme: Loads custom shell themes.
  • window-list: Adds a bottom panel with a traditional window list.
  • windowsNavigator: Enables keyboard navigation of windows and workspaces in overlay mode.
  • workspace-indicator: Adds a simple workspace switcher to the top bar.

Prerequisites

Ensure you have the following dependencies installed:

sudo apt install curl jq gnome-tweaks

Install the gnome-shell-extension-installer utility:

sudo curl -o /usr/local/bin/gnome-shell-extension-installer \
https://raw.githubusercontent.com/brunelli/gnome-shell-extension-installer/master/gnome-shell-extension-installer
sudo chmod +x /usr/local/bin/gnome-shell-extension-installer

Usage

  1. Clone this gist or download the install_gnome_extensions.sh script.
  2. Make the script executable:
    chmod +x install_gnome_extensions.sh
  3. Run the script:
    ./install_gnome_extensions.sh
  4. Restart GNOME Shell:
    • Press Alt + F2, type r, and press Enter.
    • Alternatively, reboot your system.

Notes

  • After installation, you can enable extensions using GNOME Tweaks or the command-line tool:
    gnome-extensions enable <extension-name>
  • To remove any extension, use:
    gnome-extensions uninstall <extension-uuid>

License

This script is distributed under the MIT License. See the LICENSE file for details.

#!/bin/bash
# List of extensions and their IDs from the GNOME Extensions website
declare -A extensions=(
["apps-menu"]=6
["auto-move-windows"]=8
["drive-menu"]=7
["launch-new-instance"]=114
["light-style"]=517
["native-window-placement"]=18
["places-menu"]=13
["screenshot-window-sizer"]=310
["status-icons"]=28
["system-monitor"]=120
["user-theme"]=19
["window-list"]=5
["windowsNavigator"]=10
["workspace-indicator"]=15
)
echo "Starting GNOME Shell extensions installation..."
for ext in "${!extensions[@]}"; do
echo "Installing ${ext}..."
gnome-shell-extension-installer "${extensions[$ext]}" --yes
done
echo "All extensions installed. Restart GNOME Shell (Alt+F2, type 'r', and press Enter) or reboot your system."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment