Skip to content

Instantly share code, notes, and snippets.

@Sorebit
Created October 26, 2023 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sorebit/602a2e7bf8888f84ae762a7121e025f3 to your computer and use it in GitHub Desktop.
Save Sorebit/602a2e7bf8888f84ae762a7121e025f3 to your computer and use it in GitHub Desktop.
Extract and save default Adwaita shell theme for GNOME
#!/usr/bin/env bash
#
# adwaita-shell - extracts and saves default Adwaita shell theme for GNOME.
# Requires gnome-tweaks and User Themes extension.
# Also sudo apt install font-cantarell for default fonts.
# sorebit, https://github.com/sorebit
#
# Note: This seems to be deprecated since on new GNOME even Ubuntu allows you to pick the default accent color for Adwaita.
# Safety
set -e
# Setup
theme_dir="$HOME/.themes/Adwaita/gnome-shell/"
gres_path="/usr/share/gnome-shell/gnome-shell-theme.gresource"
gnome_theme_dir="/org/gnome/shell/theme"
css_file="gnome_shell.css"
# Execute
mkdir -p "${theme_dir}"
gresource extract "${gres_path}" "${gnome_theme_dir}/${css_file}" > "${theme_dir}/${css_file}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment