#!/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 mirror --reverse --delete --verbose --dereference --exclude "^Promethean/" --exclude "^models/blobs/" --exclude "^ollama/" --exclude "^interface/web/node_modules/" --exclude "^interface/web/dist/" --exclude "^runtime/logs/" --exclude "runtime/backend\.log$" --exclude "runtime/frontend\.log$" --exclude "__pycache__" --exclude "\.pyc$" /home/jon/nexus-core /Wingdrive2/nexus-backup quit LFTP