From 62486ca5ef7d7810d2f182684699950e9595297b Mon Sep 17 00:00:00 2001
From: Azalea Gui <me@hydev.org>
Date: Fri, 20 Jan 2023 20:04:41 -0500
Subject: [PATCH] [+] Linux bluetooth detection

https://github.com/dylanaraps/neofetch/issues/2284
---
 neofetch | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/neofetch b/neofetch
index beb7b137..94052968 100755
--- a/neofetch
+++ b/neofetch
@@ -76,6 +76,7 @@ print_info() {
     info "GPU" gpu
     info "Memory" memory
     info "Network" network
+    info "Bluetooth" bluetooth
     info "BIOS" bios
 
     # info "GPU Driver" gpu_driver  # Linux/macOS only
@@ -3413,6 +3414,16 @@ get_network() {
     fi
 }
 
+get_bluetooth() {
+    # Find bluetooth using lsusb
+    if command -v lsusb &> /dev/null; then
+        bluetooth="$(lsusb | cut -c34- | grep -i bluetooth)"
+    fi
+
+    # Remove "Bluetooth" suffix
+    bluetooth="${bluetooth%[Bb]luetooth}"
+}
+
 get_song() {
     players=(
         "amarok"
@@ -6354,6 +6365,7 @@ get_args() {
                     info "GPU Driver" gpu_driver
                     info "Memory" memory
                     info "Network" network
+                    info "Bluetooth" bluetooth
                     info "BIOS" bios
 
                     info "Disk" disk