* Stop pipefail from turning grep -q SIGPIPE exits into false negatives grep -q exits at the first match, and when the producer is still writing it dies with SIGPIPE. Under pipefail that 141 becomes the pipeline's status, so hardware checks like lspci | grep -q read as "not found" on exactly the machines they target. The T2 defaults migration hit this and silently skipped real T2 Macs (#6608). Redirect grep to /dev/null instead of -q wherever a pipeline feeds grep in a pipefail context, so grep reads all input and the producer never gets killed. The install-time T2 checks aren't run under pipefail today but are switched too, since they're the same detection line the issue calls out. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Re-run the T2 defaults migration its broken hardware check skipped The SIGPIPE bug marked 1785944594 as applied without doing anything on affected T2 Macs. The original migration is idempotent, so a fresh migration can just source it now that the guard is fixed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Address Copilot review: fix OCR grep pipeline and prove the T2 repair screen_contains piped tesseract into grep -Fqi under the acceptance suite's pipefail, the same SIGPIPE false negative the rest of the branch fixes. The T2 test's lspci stub now keeps writing past the pipe buffer after the match so every scenario exercises the SIGPIPE case, and a new case runs the rerun migration against fixtures a bitten install would have. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
36 lines
1.4 KiB
Bash
36 lines
1.4 KiB
Bash
echo "Backfill hardware support and tmux settings added before Omarchy quattro"
|
|
|
|
tmux_config="$HOME/.config/tmux/tmux.conf"
|
|
if [[ -f $tmux_config ]]; then
|
|
sed -i 's/^set -g terminal-features\[3\] "xterm-kitty:extkeys"$/set -ag terminal-features "xterm-kitty:extkeys"/' "$tmux_config"
|
|
|
|
if ! grep -q 'M-S-Enter' "$tmux_config"; then
|
|
sed -i '/^# Pane Controls$/a\bind -n M-Enter split-window -v -c "#{pane_current_path}"\nbind -n M-S-Enter split-window -h -c "#{pane_current_path}"\nbind -n M-Escape kill-pane\n' "$tmux_config"
|
|
fi
|
|
|
|
omarchy-restart-tmux
|
|
fi
|
|
|
|
hardware_packages=()
|
|
if lspci | grep -iE '(Multimedia audio controller|Audio device).*Intel' >/dev/null && omarchy-pkg-missing sof-firmware; then
|
|
hardware_packages+=(sof-firmware)
|
|
fi
|
|
if lspci | grep -iE '(VGA|Display).*Intel' >/dev/null && omarchy-pkg-missing vulkan-intel; then
|
|
hardware_packages+=(vulkan-intel)
|
|
fi
|
|
if lspci | grep -iE '(VGA|Display).*AMD' >/dev/null && omarchy-pkg-missing vulkan-radeon; then
|
|
hardware_packages+=(vulkan-radeon)
|
|
fi
|
|
if lspci | grep -iE '(VGA|Display).*Apple' >/dev/null && omarchy-pkg-missing vulkan-asahi; then
|
|
hardware_packages+=(vulkan-asahi)
|
|
fi
|
|
|
|
if (( ${#hardware_packages[@]} > 0 )); then
|
|
omarchy-pkg-add "${hardware_packages[@]}"
|
|
omarchy-state set reboot-required
|
|
fi
|
|
|
|
if omarchy-hw-match "DX13260"; then
|
|
gsettings set org.gnome.desktop.interface text-scaling-factor 0.95
|
|
fi
|