mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 22:23:11 +02:00
16 lines
381 B
Bash
Executable File
16 lines
381 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Get Bluetooth device info
|
|
bluetooth_info=$(bluetoothctl info)
|
|
|
|
# Check if Bluetooth is connected
|
|
if echo "$bluetooth_info" | grep -q "Connected: yes"; then
|
|
device=$(echo "$bluetooth_info" | grep "Alias" | cut -d ' ' -f2-)
|
|
echo " $device" # is the Bluetooth icon
|
|
echo
|
|
echo "#50FA7B" # Green for connected
|
|
else
|
|
echo " Disconnected"
|
|
fi
|
|
|