revert: bluetooth-manager.sh

This commit is contained in:
JEEVITHA KANNAN K S 2024-11-04 12:20:47 +05:30
parent e2f87e38b1
commit a6e948f1c9
No known key found for this signature in database
GPG Key ID: 5904C34A2F7CE333

View File

@ -32,7 +32,7 @@ setupBluetooth() {
# Function to display the main menu # Function to display the main menu
main_menu() { main_menu() {
while true; do while true; do
clear
printf "%b\n" "${YELLOW}Bluetooth Manager${RC}" printf "%b\n" "${YELLOW}Bluetooth Manager${RC}"
printf "%b\n" "${YELLOW}=================${RC}" printf "%b\n" "${YELLOW}=================${RC}"
printf "%b\n" "1. Scan for devices" printf "%b\n" "1. Scan for devices"
@ -58,7 +58,7 @@ main_menu() {
# Function to scan for devices # Function to scan for devices
scan_devices() { scan_devices() {
clear
printf "%b\n" "${YELLOW}Scanning for devices...${RC}" printf "%b\n" "${YELLOW}Scanning for devices...${RC}"
bluetoothctl --timeout 10 scan on bluetoothctl --timeout 10 scan on
devices=$(bluetoothctl devices) devices=$(bluetoothctl devices)
@ -81,7 +81,7 @@ prompt_for_mac() {
failure_msg=$5 failure_msg=$5
while true; do while true; do
clear
devices=$(bluetoothctl devices) devices=$(bluetoothctl devices)
if [ -z "$devices" ]; then if [ -z "$devices" ]; then
printf "%b\n" "${RED}No devices available. Please scan for devices first.${RC}" printf "%b\n" "${RED}No devices available. Please scan for devices first.${RC}"