Skip to content

Fix Bluetooth status on BlueZ 5.87+, open CC lists on tile click, and add Forget Wi-Fi/BT - #58

Open
zSnowww wants to merge 6 commits into
0-ss:mainfrom
zSnowww:fix/wifi-bt-control-center-and-forget
Open

zSnowww wants to merge 6 commits into
0-ss:mainfrom
zSnowww:fix/wifi-bt-control-center-and-forget

Conversation

@zSnowww

@zSnowww zSnowww commented Nov 24, 2026

Copy link
Copy Markdown

Summary

Three related connectivity fixes & quality-of-life improvements for Control Center and System Settings (MacBar.qml / MacDock.qml):

  1. Fix Bluetooth connected/paired detection on newer BlueZ (5.87+) (fix(bluetooth): handle BlueZ per-bearer info lines in btProc)

    • Modern BlueZ prints both top-level and per-bearer (BREDR.* / LE.*) status lines in bluetoothctl info <mac>:
      Paired: yes
      Bonded: yes
      Connected: yes
      BREDR.Paired: yes
      BREDR.Bonded: yes
      BREDR.Connected: yes
      
    • btProc previously ran grep -Ec 'Paired: yes|Bonded: yes' and grep -c 'Connected: yes', returning counts > 1 (e.g. 4 and 2), while QML checked f[1] === "1" and f[2] === "1". Connected devices (such as AirPods Pro) therefore appeared as Not Connected.
    • Anchored the grep -qE checks to top-level fields emitting 0/1, and parsed Number(f[...]) > 0 in QML.
  2. Open Wi-Fi / Bluetooth list when clicking the Control Center tile (fix(control-center): open Wi-Fi and Bluetooth lists on tile click)

    • Clicking the Wi-Fi or Bluetooth Control Center tile previously toggled the radio directly unless the small arrow target was clicked, which led to accidentally turning off Wi-Fi/Bluetooth when trying to switch networks or devices.
    • Both tiles now open their Control Center list page (ui.ccPage = "wifi" / "bt"), where the top-right switch toggles the radio.
  3. Add "Forget" for saved Wi-Fi networks and paired Bluetooth devices in System Settings (feat(settings): add Forget Wi-Fi network and Forget Bluetooth device)

    • Wi-Fi: keeps Nearby Networks (both unsaved and in-range saved networks) at the top with Scan Again, followed by Known Networks listing all NetworkManager 802-11-wireless profiles (including out-of-range ones and profiles whose connection name differs from the SSID) with Connect / Disconnect and Forget.
    • Bluetooth: adds Forget (bluetoothctl remove <mac>) alongside Connect / Disconnect in My Devices.
    • Uses an inline two-step confirmation (Forget → Cancel / solid red Confirm with 4 s auto-reset) and updates the lists immediately upon nmcli connection delete / bluetoothctl remove completion.

Testing

  • Tested live on Arch/Hyprland/Quickshell with bluetoothctl 5.87 + connected AirPods Pro (D:41:42:40:1D:96:15 1 1 70 AirPods Pro), NetworkManager saved profiles (including out-of-range and multi-profile SSIDs), and inline two-step forget confirmation.
  • Verified with qmllint (no syntax errors introduced).

Copilot AI balanced review requested due to automatic review settings November 24, 2026 20:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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