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>
43 lines
1.5 KiB
Bash
Executable File
43 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Purpose : NetworkManager runs this as root when the network's connectivity
|
|
# changes (system/captive-portal.sh installs it in dispatcher.d).
|
|
# On a network with a sign-in page (a captive portal: hotels,
|
|
# airports, trains), a Tailscale exit node sends the sign-in page
|
|
# into a tunnel the network is still blocking, so GNOME's sign-in
|
|
# window stays blank. Stop using the exit node until you've signed
|
|
# in, then use it again.
|
|
|
|
# For the tests
|
|
PAUSED="${CAPTIVE_PORTAL_STATE:-/run/coredesktop-exit-node-paused}"
|
|
|
|
[ "$2" = connectivity-change ] || exit 0
|
|
command -v tailscale > /dev/null || exit 0
|
|
|
|
case "$CONNECTIVITY_STATE" in
|
|
PORTAL)
|
|
[ -e "$PAUSED" ] && exit 0
|
|
# The exit node's Tailscale address, without its /32
|
|
node="$(tailscale status --json 2> /dev/null | jq -r '.ExitNodeStatus.TailscaleIPs[0] // empty')"
|
|
node="${node%/*}"
|
|
[ -n "$node" ] || exit 0
|
|
echo "$node" > "$PAUSED"
|
|
if tailscale set --exit-node=; then
|
|
logger -t coredesktop "Signing in to a captive portal: stopped using exit node $node until online"
|
|
else
|
|
rm -f "$PAUSED"
|
|
fi
|
|
;;
|
|
FULL)
|
|
[ -s "$PAUSED" ] || exit 0
|
|
node="$(< "$PAUSED")"
|
|
# Leave it if you picked another exit node meanwhile
|
|
if [ -z "$(tailscale status --json 2> /dev/null | jq -r '.ExitNodeStatus // empty')" ]; then
|
|
tailscale set --exit-node="$node" \
|
|
&& logger -t coredesktop "Online again: using exit node $node again"
|
|
fi
|
|
rm -f "$PAUSED"
|
|
;;
|
|
esac
|
|
exit 0
|