feat(assets): NexusOS asset + theme rebrand
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# install-theme.sh — restore the NexusOS desktop theme wiring.
|
||||
#
|
||||
# The theme *assets* live in this repo (assets/themes/, management/Mint-Y-Nexus/).
|
||||
# The theme *assets* live in this repo (assets/themes/).
|
||||
# This script recreates everything OUTSIDE the repo that makes the desktop
|
||||
# actually use them: symlinks, xfconf (xsettings + xfwm4), and the canonical
|
||||
# lines in the GTK 3/4 settings.ini files.
|
||||
@@ -75,7 +75,6 @@ echo "NexusOS theme — restoring wiring from $REPO"
|
||||
echo "[1/4] Symlinks"
|
||||
link "$REPO/assets/themes/NexusOS" "$HOME/.themes/NexusOS"
|
||||
link "$REPO/assets/themes/NexusOS-icons" "$HOME/.icons/NexusOS"
|
||||
link "$REPO/management/Mint-Y-Nexus" "$HOME/.icons/Mint-Y-Nexus"
|
||||
link "$REPO/assets/themes/gtk3-user-overrides.css" "$HOME/.config/gtk-3.0/gtk.css"
|
||||
|
||||
echo "[2/4] xfconf (xsettings + xfwm4)"
|
||||
@@ -95,22 +94,34 @@ for f in "$HOME/.config/gtk-3.0/settings.ini" "$HOME/.config/gtk-4.0/settings.in
|
||||
set_ini "$f" gtk-font-name "$FONT_NAME"
|
||||
done
|
||||
|
||||
echo "[4/4] Sanity"
|
||||
for dir in /usr/share/icons ~/.icons ~/.local/share/icons; do
|
||||
[[ -d "$dir/$CURSOR_THEME" ]] && { say "ok cursor '$CURSOR_THEME' found"; CUR_OK=1; break; }
|
||||
done
|
||||
[[ "${CUR_OK:-0}" == 1 ]] || say "WARN cursor theme '$CURSOR_THEME' not installed — will fall back"
|
||||
echo "[4/4] Icon caches"
|
||||
gtk-update-icon-cache -f -t "$HOME/.icons/NexusOS" 2>/dev/null \
|
||||
&& say "ok NexusOS icon cache rebuilt" \
|
||||
|| say "WARN NexusOS icon cache rebuild failed"
|
||||
INH="$(grep -i '^Inherits=' "$REPO/assets/themes/NexusOS-icons/index.theme" 2>/dev/null | cut -d= -f2)"
|
||||
if [[ -n "$INH" ]]; then
|
||||
INH_OK=0
|
||||
for dir in /usr/share/icons ~/.icons ~/.local/share/icons; do
|
||||
[[ -d "$dir/$INH" ]] && { INH_OK=1; break; }
|
||||
[[ -d "$dir/$INH" ]] && { INH_OK=1; INH_DIR="$dir/$INH"; break; }
|
||||
done
|
||||
[[ "$INH_OK" == 1 ]] \
|
||||
&& say "ok icon fallback '$INH' found" \
|
||||
|| say "WARN icon fallback '$INH' not installed — icons may be missing"
|
||||
if [[ "$INH_OK" == 1 ]]; then
|
||||
say "ok icon fallback '$INH' found"
|
||||
if sudo -n gtk-update-icon-cache -f -t "$INH_DIR" 2>/dev/null; then
|
||||
say "ok $INH icon cache rebuilt"
|
||||
else
|
||||
say "note $INH cache skipped (no passwordless sudo — run manually if needed)"
|
||||
fi
|
||||
else
|
||||
say "WARN icon fallback '$INH' not installed — icons may be missing"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "[5/5] Sanity"
|
||||
for dir in /usr/share/icons ~/.icons ~/.local/share/icons; do
|
||||
[[ -d "$dir/$CURSOR_THEME" ]] && { say "ok cursor '$CURSOR_THEME' found"; CUR_OK=1; break; }
|
||||
done
|
||||
[[ "${CUR_OK:-0}" == 1 ]] || say "WARN cursor theme '$CURSOR_THEME' not installed — will fall back"
|
||||
|
||||
if [[ "$RELOAD" == 1 ]] && command -v xfconf-query >/dev/null && [[ -n "${DISPLAY:-}" ]]; then
|
||||
xfconf-query -c xsettings -p /Net/ThemeName -s "Adwaita" 2>/dev/null || true
|
||||
xfconf-query -c xsettings -p /Net/ThemeName -s "$GTK_THEME" 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user