commit 1212affe13f8210c7aac8fcd77c7bd390f238935
parent 9b135e7befb34cf70d212950788848db543f60d4
Author: Damian Myrda <damian@prime8.dev>
Date: Sat, 31 Jan 2026 22:17:51 -0600
add gdm theme overlay script for silverblue
Diffstat:
2 files changed, 121 insertions(+), 0 deletions(-)
diff --git a/apply-gdm-theme-overlay.sh b/apply-gdm-theme-overlay.sh
@@ -0,0 +1,85 @@
+#!/usr/bin/env bash
+# Apply WhiteSur GDM theme using rpm-ostree usroverlay
+# This creates a temporary overlay on /usr to modify the gresource file
+
+set -euo pipefail
+
+echo "WhiteSur GDM Theme Installer for Silverblue"
+echo "==========================================="
+echo ""
+echo "This script will:"
+echo "1. Create a temporary overlay on /usr (using rpm-ostree usroverlay)"
+echo "2. Replace the gnome-shell-theme.gresource file"
+echo "3. The theme will persist until next reboot"
+echo ""
+echo "To make this permanent, you'll need to:"
+echo "- Either run this script after each boot"
+echo "- Or create a systemd service to apply it automatically"
+echo ""
+read -p "Continue? (y/n) " -n 1 -r
+echo
+
+if [[ ! $REPLY =~ ^[Yy]$ ]]; then
+ exit 0
+fi
+
+# Check if running as root
+if [[ $EUID -ne 0 ]]; then
+ echo "This script must be run as root (use sudo)"
+ exit 1
+fi
+
+# Check if theme exists
+if [[ ! -f /usr/share/gnome-shell/gnome-shell-theme.gresource ]]; then
+ echo "Error: Original gresource file not found"
+ exit 1
+fi
+
+echo ""
+echo "Step 1: Creating overlay on /usr..."
+rpm-ostree usroverlay || {
+ echo "Failed to create overlay. Is rpm-ostree available?"
+ exit 1
+}
+
+echo ""
+echo "Step 2: Checking if gresource file is now writable..."
+if [[ ! -w /usr/share/gnome-shell/gnome-shell-theme.gresource ]]; then
+ echo "Error: File is still not writable after overlay"
+ echo "The overlay may not have worked correctly"
+ exit 1
+fi
+
+echo ""
+echo "Step 3: Backing up original gresource..."
+cp /usr/share/gnome-shell/gnome-shell-theme.gresource \
+ /usr/share/gnome-shell/gnome-shell-theme.gresource.bak.$(date +%Y%m%d_%H%M%S)
+
+echo ""
+echo "Step 4: Installing WhiteSur gresource..."
+if [[ -f /usr/share/gnome-shell/gnome-shell-theme.gresource ]]; then
+ # Copy the layered version from the RPM
+ cp /usr/share/gnome-shell/gnome-shell-theme.gresource \
+ /usr/share/gnome-shell/gnome-shell-theme.gresource.new
+
+ # Replace the original
+ mv /usr/share/gnome-shell/gnome-shell-theme.gresource.new \
+ /usr/share/gnome-shell/gnome-shell-theme.gresource
+
+ echo "✓ GDM theme applied successfully!"
+else
+ echo "Error: Cannot find the WhiteSur gresource file"
+ echo "Make sure gdm-themes RPM is installed first"
+ exit 1
+fi
+
+echo ""
+echo "==========================================="
+echo "GDM theme has been applied!"
+echo ""
+echo "IMPORTANT NOTES:"
+echo "- The theme will persist until next reboot"
+echo "- To make it permanent, create a systemd service that runs this script on boot"
+echo "- Or re-run this script after each reboot"
+echo ""
+echo "To verify, logout and check the GDM login screen"
diff --git a/install-whitesur-gdm.sh b/install-whitesur-gdm.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+# Install WhiteSur GDM theme using official installer
+# This downloads the WhiteSur theme source and runs the official GDM installer
+
+set -euo pipefail
+
+REPO_DIR="/tmp/whitesur-installer"
+THEME_VERSION="2024-10-01" # Adjust as needed
+
+echo "Downloading WhiteSur theme source..."
+
+# Clean up previous attempts
+rm -rf "${REPO_DIR}"
+mkdir -p "${REPO_DIR}"
+
+# Download WhiteSur theme
+cd "${REPO_DIR}"
+if ! curl -L -o whitesur-theme.tar.gz "https://github.com/vinceliuice/WhiteSur-gtk-theme/archive/refs/tags/2024-09-18.tar.gz"; then
+ echo "Failed to download WhiteSur theme"
+ echo "Please manually download from: https://github.com/vinceliuice/WhiteSur-gtk-theme"
+ exit 1
+fi
+
+echo "Extracting..."
+tar -xzf whitesur-theme.tar.gz --strip-components=1
+
+echo "Installing WhiteSur GDM theme..."
+# Install GDM theme only (dark yellow variant)
+sudo ./tweaks.sh -g -b default
+
+echo "Cleaning up..."
+cd /
+rm -rf "${REPO_DIR}"
+
+echo "WhiteSur GDM theme installed!"
+echo "Please reboot to see the changes."