From dae9cd50a8d8de0c2b394a0250fdf516c4290d66 Mon Sep 17 00:00:00 2001 From: Sho Date: Sun, 2 Aug 2026 00:15:55 +0900 Subject: [PATCH] fix: add repair_feishin_flatpak step to install.sh to fix Flatpak sandbox corruption --- install.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/install.sh b/install.sh index fd00b85..54a9eb5 100755 --- a/install.sh +++ b/install.sh @@ -388,6 +388,35 @@ EOF success "Systemd user service configured at ${SERVICE_DIR}/quickshell.service!" } +# Helper to repair Flatpak Feishin sandbox config corruption +repair_feishin_flatpak() { + info "Scanning and repairing Flatpak Feishin sandbox configurations..." + local VAR_APP="${HOME}/.var/app" + if [ -d "$VAR_APP" ]; then + for app_dir in "$VAR_APP"/*feishin* "$VAR_APP"/*Feishin*; do + if [ -d "$app_dir" ]; then + for sub in "config/feishin" "config/Feishin" "data/feishin" "data/Feishin" "config" "data"; do + local target="${app_dir}/${sub}" + if [ -d "$target" ]; then + python3 -c " +import os, json +for bad in ['config.json', 'settings.json']: + p = os.path.join('$target', bad) + if os.path.exists(p): + try: + with open(p, 'r', encoding='utf-8') as f: d = json.load(f) + if isinstance(d, dict) and list(d.keys()) == ['theme']: + os.remove(p) + print(f'[Repaired Flatpak Feishin] Removed bad {bad} at {p}') + except Exception: pass +" 2>/dev/null || true + fi + done + fi + done + fi +} + # 7. Run Theme Sync Engine run_initial_sync() { info "Triggering initial multi-app dynamic theme synchronization..." @@ -414,6 +443,7 @@ install_quickshell install_wallust_lutgen deploy_configs deploy_kde_colorschemes +repair_feishin_flatpak setup_bashrc setup_systemd_service run_initial_sync