Add upgrade safeguards, hardware setup, sign-in options and Taildrop from Omarchy
shellcheck / shellcheck (push) Failing after 19s

Adapted from Omarchy (github.com/omacom/omarchy) for Arch with GNOME:

- A pacman hook stops a full upgrade run without update (pacman -Syu,
  yay -Syu), which would skip the snapshot and update's checks. update
  and install.sh set COREDESKTOP_ALLOW_PACMAN=1, which the hook finds on
  pacman or any process above it; you can set it too.
- When the Arch upgrade stops on files no package owns, update lists
  them and asks to move them to /var/lib/coredesktop/replaced and try
  again, putting back what the retry didn't replace. When packages
  conflict, it runs pacman again so you can choose.
- update and install keep the computer from sleeping until they finish.
- system/hardware.sh (install, and a migration): the Wi-Fi country from
  the time zone, thermald and intel-lpmd on Intel laptops, and Wi-Fi 6
  on Intel BE200/BE211 cards, whose driver gets Wi-Fi 7 wrong.
- configure security-key and configure fingerprint: touch a FIDO2 key
  or a finger instead of typing your password for sudo and polkit,
  falling back to the password. Each shows only when the hardware is
  there. The fingerprint skips to the password with the lid shut.
- webapp: put a website in the app grid as its own app window.
- Taildrop: Files' Scripts > Send with Tailscale, and a user service
  that saves files sent here to Downloads, started when configure
  tailscale joins.
- A NetworkManager dispatcher script pauses a Tailscale exit node while
  you sign in to a captive portal, and resumes it once online.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-16 12:08:06 -07:00
co-authored by Claude Opus 5.5
parent 5d7db2cdc8
commit 9dc5eb193d
32 changed files with 1809 additions and 9 deletions
+25 -2
View File
@@ -11,7 +11,7 @@ setup() {
CD="$HOME/.local/share/coredesktop"
mkdir -p "$CD/updates.d" "$HOME/.local/bin"
cp "$REPO/update" "$CD/update"
for script in refresh sibling version configure audit report; do
for script in refresh sibling version configure audit report webapp; do
echo '#!/bin/bash' > "$CD/$script"
done
@@ -25,6 +25,8 @@ setup() {
# Let go of bats' output pipes so the sudo keepalive's leftover sleep
# doesn't keep the test waiting
stub sleep 'exec > /dev/null 2>&1 3>&-; exec /usr/bin/sleep "$@"'
# Not the real one: it would ask logind to keep this computer awake
stub systemd-inhibit
}
# hook NAME BODY: add updates.d/NAME.sh with BODY as its run_update
@@ -51,11 +53,32 @@ ran() {
[[ "$output" == *"Done."* ]]
called git -C "$CD" pull --ff-only
ran a b
for script in update refresh sibling version configure audit report; do
for script in update refresh sibling version configure audit report webapp; do
[ -x "$HOME/.local/bin/$script" ]
done
}
@test "update keeps the computer awake while it runs" {
hook 10-a 'echo a >> "$RAN"'
run "$CD/update"
[ "$status" -eq 0 ]
# In the background, so give it a moment
for _ in 1 2 3 4 5 6 7 8 9 10; do
grep -q '^systemd-inhibit ' "$STUB_LOG" && break
/usr/bin/sleep 0.1
done
grep -q '^systemd-inhibit --what=sleep:idle .* --mode=block tail --pid=[0-9]* -f /dev/null$' "$STUB_LOG"
}
@test "update's hooks may upgrade past the pacman guard" {
hook 10-a 'echo "$COREDESKTOP_ALLOW_PACMAN" >> "$RAN"'
run "$CD/update"
[ "$status" -eq 0 ]
ran 1
}
@test "update pulls only once, before re-running its new copy" {
hook 10-a 'echo a >> "$RAN"'