NoSignal-OS/os updates/wifi-password-retry/install-wifi-password-retry.sh
28allday 19fd794b6b NoSignal — fully-offline Arch → Hyprland desktop installer
Single-script builder (nosignal.sh) that turns a stock Arch Linux ISO into a
fully-offline installer for a themed Hyprland + caelestia (Quickshell) desktop:
matching SDDM greeter, Btrfs/Limine bootable snapshots, chwd-style GPU
detection, and a curated "os updates" layer (keybind cheatsheet, settings
panels, system polish, on-box management skill). See README.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 11:03:10 +01:00

41 lines
1.4 KiB
Bash
Executable file

#!/bin/sh
# install-wifi-password-retry.sh — let users recover from a wrong Wi-Fi
# password.
#
# - patch-network-connection.sh -> ~/.local/share/nosignal/wifi-password-retry/
# (stable on-system copy; the pacman hook points here)
# - NetworkConnection.qml -> patched in caelestia-shell (sudo)
# - pacman hook -> re-applies the patch after shell upgrades
#
# Safe to re-run (idempotent). Needs sudo for the QML patch + hook.
set -eu
SRC=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
SHARE="$HOME/.local/share/nosignal/wifi-password-retry"
# 1. Stable on-system copy of the patch (the pacman hook points here).
mkdir -p "$SHARE"
install -m 0755 "$SRC/patch-network-connection.sh" "$SHARE/patch-network-connection.sh"
# 2. Apply the QML patch now.
sudo sh "$SHARE/patch-network-connection.sh"
# 3. Pacman hook: caelestia-shell upgrades revert NetworkConnection.qml — re-patch.
HOOK=/etc/pacman.d/hooks/nosignal-wifi-password-retry.hook
sudo mkdir -p /etc/pacman.d/hooks
sudo tee "$HOOK" > /dev/null <<EOF
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = nosignal-shell
Target = caelestia-shell
[Action]
Description = Re-applying NoSignal Wi-Fi wrong-password recovery patch...
When = PostTransaction
Exec = /bin/sh $SHARE/patch-network-connection.sh
EOF
echo ":: pacman hook installed -> $HOOK"
echo "Done. Restart the shell (Ctrl+Super+Alt+R) to pick up the patch."