fix(installer): detect and recover missing shell integration in update mode

When running --update, now actively checks if shell.qml integration was
lost (e.g., after dotfiles update) and offers:
1. Auto-integrate with backup
2. Show manual instructions
3. Skip

Previously only showed a passive warning after completion.
This commit is contained in:
DJ committed 2025-12-08 16:38:20 -05:00
1 parent bdc5455fce
commit e5857bc938
2 files changed
+34 -5

No files matched your search

+4 -2
View File
@@ -110,14 +110,16 @@ cd hypr-lens
## Updating
Pull the latest changes and run the update command to refresh installed files without re-prompting for setup options:
Pull the latest changes and run the update command to refresh installed files:
```bash
git pull
./hypr-lens-install.sh --update
```
> This preserves your existing config and skips interactive prompts.
This preserves your existing config and skips most setup prompts.
> **💡 Integration Recovery:** If your `shell.qml` was overwritten (e.g., after updating your dotfiles), the update command will detect the missing integration and offer to fix it automatically.
### Starting hypr-lens
+30 -3
View File
@@ -976,13 +976,40 @@ update() {
echo "=============================================="
echo ""
# Show abbreviated next steps
# Check shell integration - offer recovery if missing
if is_shell_integrated; then
success "Shell integration verified"
info "Restart quickshell to apply changes:"
echo " killall quickshell; quickshell &"
else
warn "Shell integration not detected"
echo " Run without --update for integration instructions"
warn "Shell integration missing (shell.qml may have been overwritten)"
echo ""
echo " Options:"
echo " 1) Auto-integrate into shell.qml (creates backup)"
echo " 2) Show manual integration instructions"
echo " 3) Skip (fix later)"
echo ""
echo -e -n "${YELLOW}[?]${NC} Choose option [1/2/3]: "
read -r choice
case "$choice" in
1)
auto_integrate_shell
;;
2)
echo ""
info "Add to ~/.config/quickshell/shell.qml:"
echo ""
echo " // At the top with imports:"
echo " import \"./hypr-lens/modules/regionSelector\""
echo ""
echo " // Inside root component (Scope, ShellRoot, etc.):"
echo " RegionSelector {}"
echo ""
;;
3|"")
info "Skipped. Run installer without --update for full setup."
;;
esac
fi
echo ""
}