Skip to content

Commit

Permalink
[+] Linux bluetooth detection
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Jan 21, 2023
1 parent b366211 commit 62486ca
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 62486ca

Please sign in to comment.