Skip to content

Avoid connecting after Bluetooth pair failures - #383

Open
Brams-s wants to merge 1 commit into
omacom:quattrofrom
Brams-s:fix/bluetooth-pair-failure
Open

Avoid connecting after Bluetooth pair failures#383
Brams-s wants to merge 1 commit into
omacom:quattrofrom
Brams-s:fix/bluetooth-pair-failure

Conversation

@Brams-s

@Brams-s Brams-s commented Sep 9, 2026

Copy link
Copy Markdown

Summary

  • Only trust and connect a Bluetooth device after bluetoothctl pair succeeds.
  • Cover successful pairing and ensure a failed pairing does not leave an unpaired device trusted or connected.

Testing

  • bash test/shell.d/bluetooth-test.sh
  • ./test/cli
  • bin/omarchy commands --check
  • Full shell suite: 255/256 test files pass; the unrelated test/shell.d/launch-about-test.sh fails its existing roomy-window animation expectation.

@Brams-s
Brams-s force-pushed the fix/bluetooth-pair-failure branch from 242db89 to e691ebd Compare September 10, 2026 18:53
@Brams-s
Brams-s force-pushed the fix/bluetooth-pair-failure branch from e691ebd to f6e1c66 Compare September 10, 2026 20:01
@duketopceo

Copy link
Copy Markdown

Verified on MacBookPro18,1 (M1 Pro, aarch64, BCM4387 / hci_bcm4377), Omarchy 4.0.3-1:

  • bluetooth-test.sh: all pass, including the 6 new pair-failure cases (pair attempted, no trust, no connect on failure).
  • Live: omarchy-bluetooth-device pair 00:00:00:00:00:00 on the real adapter exits cleanly in ~14ms — pair returns "Device not available" (exit 1) and the new if correctly skips trust/connect. Under the old || true chain both would still have fired against a device with no pairing record, which is exactly the half-paired "connected but no A2DP sink" state this fixes.

LGTM from a test standpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants