aur/hyprwhspr.install
goodroot 08fdd1bb9f Update to v1.2.0
- Bump version from 1.1.0 to 1.2.0
- Update SHA-256 checksum for v1.2.0 release
- Fix audio feedback path resolution for relative paths
- Add shift_paste configuration option (Ctrl+Shift+V by default)
- Improve text injection compatibility across terminals and GUI apps
2025-09-06 15:03:12 -07:00

55 lines
2.1 KiB
Text

post_install() {
echo "HyprWhspr has been installed to /opt/hyprwhspr/"
echo ""
echo "Running setup script to configure permissions and services..."
# Run the installation script as the installing user
if [ -f "/opt/hyprwhspr/scripts/install-omarchy.sh" ]; then
INSTALLING_USER="${SUDO_USER:-$USER}"
echo "Executing setup as user: $INSTALLING_USER"
# Run the script as the user (it will use sudo internally when needed)
# Set environment variable to make it non-interactive for AUR
sudo -u "$INSTALLING_USER" env HYPRWHSPR_AUR_INSTALL=1 /opt/hyprwhspr/scripts/install-omarchy.sh
echo ""
echo "✅ HyprWhspr setup completed successfully!"
echo ""
echo "⚠️ IMPORTANT: Log out and back in for group changes to take effect"
echo " Then use Super+Alt+D to start dictation!"
else
echo "❌ Setup script not found. Please run manually:"
echo " /opt/hyprwhspr/scripts/install-omarchy.sh"
fi
echo ""
echo "For more information, see: /usr/share/doc/hyprwhspr/README.md"
}
post_upgrade() {
echo "HyprWhspr has been upgraded successfully!"
echo ""
echo "Re-running setup to update configuration..."
# Re-run the installation script to update components
if [ -f "/opt/hyprwhspr/scripts/install-omarchy.sh" ]; then
INSTALLING_USER="${SUDO_USER:-$USER}"
sudo -u "$INSTALLING_USER" env HYPRWHSPR_AUR_INSTALL=1 /opt/hyprwhspr/scripts/install-omarchy.sh
echo ""
echo "✅ HyprWhspr update completed successfully!"
else
echo "❌ Setup script not found. Please run manually:"
echo " /opt/hyprwhspr/scripts/install-omarchy.sh"
fi
}
pre_remove() {
echo "Stopping HyprWhspr services..."
# Stop services gracefully
INSTALLING_USER="${SUDO_USER:-$USER}"
sudo -u "$INSTALLING_USER" systemctl --user stop hyprwhspr.service 2>/dev/null || true
sudo -u "$INSTALLING_USER" systemctl --user stop ydotoold.service 2>/dev/null || true
echo "✅ Services stopped"
}