It would be an improvement if, after a failed connection attempt to a device, the device menu automatically reappeared, enabling users to easily retry the connection.
So please add this code to line 135:
# Check if a device is connected
if bluetoothctl info | grep -q "Connected: yes"; then
notify-send "Success" "Bluetooth device connected successfully."
else
notify-send "Error" "Failed to connect to Bluetooth device."
device_menu "$device"
fi
It would be an improvement if, after a failed connection attempt to a device, the device menu automatically reappeared, enabling users to easily retry the connection.
So please add this code to line 135: