Regenerated

This commit is contained in:
2026-03-31 17:18:49 +00:00
parent 3575087aa1
commit 7db3cb54d0
3 changed files with 320 additions and 299 deletions
@@ -1,11 +1,18 @@
#!/usr/bin/env bash
# Get list of connected devices
bt_connected=$(bluetoothctl devices Connected | awk '{$1=$2=""; print substr($0,3)}')
# Icon for display
# Get connected devices
bt_connected=$(bluetoothctl devices | while read -r line; do
mac=$(echo "$line" | awk '{print $2}')
state=$(bluetoothctl info "$mac" | grep "Connected" | awk '{print $2}')
if [ "$state" = "yes" ]; then
name=$(echo "$line" | cut -d' ' -f3-)
echo "$name"
fi
done)
# Main icon for Waybar
if [ -n "$bt_connected" ]; then
echo "" # Main icon
echo ""
else
echo ""
fi
# Export list for tooltip
# Tooltip: connected device names
echo "$bt_connected"