Wire theme restore/backup into bin/restore.sh and bin/backup.sh

- restore.sh: after folder+venv+frontend restore, runs
  assets/themes/install-theme.sh to rebuild the desktop wiring
- backup.sh: snapshots live xfconf + GTK 3/4 settings.ini into
  assets/themes/restore-snapshot/ before the router mirror, so the
  backup captures actual state (install-theme.sh stays the applier)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jon
2026-05-18 13:43:14 -05:00
parent b0aa0438af
commit 6cb48f372b
5 changed files with 64 additions and 0 deletions
+18
View File
@@ -1,5 +1,23 @@
#!/bin/bash
# Snapshot the live NexusOS desktop wiring into the repo before mirroring,
# so the backup captures the ACTUAL current state (not just the canonical
# defaults baked into assets/themes/install-theme.sh). This is a reference
# copy for recovery/diffing; install-theme.sh remains the applier on restore.
snap="$HOME/nexus-core/assets/themes/restore-snapshot"
mkdir -p "$snap"
{
echo "# NexusOS live desktop wiring — snapshot $(date -Is)"
echo "# Reference only. Restore is done by assets/themes/install-theme.sh"
for p in /Net/ThemeName /Net/IconThemeName /Gtk/CursorThemeName \
/Gtk/CursorThemeSize /Gtk/FontName; do
echo "xsettings $p = $(xfconf-query -c xsettings -p "$p" 2>/dev/null)"
done
echo "xfwm4 /general/theme = $(xfconf-query -c xfwm4 -p /general/theme 2>/dev/null)"
} > "$snap/xfconf.txt" 2>/dev/null || true
cp -f "$HOME/.config/gtk-3.0/settings.ini" "$snap/gtk-3.0-settings.ini" 2>/dev/null || true
cp -f "$HOME/.config/gtk-4.0/settings.ini" "$snap/gtk-4.0-settings.ini" 2>/dev/null || true
lftp sftp://router:2022 << 'LFTP'
set sftp:connect-program "ssh -a -x -p 2022"
set cmd:interactive yes