Files
dotfiles/Scripts/.local/scripts/status/bluetooth-status
Aryadev Chavali 0d7970742f Some work on Scripts
notable changes:
- rename `bt-connect` to `bt_connect`
- rename `music` to `media` and make it generic instead of checking
  Spotify
- make separate script to set background to a preset black image
- make all shebangs "#!/usr/bin/env sh"
2025-04-05 19:40:22 +01:00

16 lines
312 B
Bash
Executable File

#!/usr/bin/env sh
name=$(bluetoothctl info | grep "Alias" | sed 's/.*Alias: //')
battery=$(bluetoothctl info | grep "Battery Percentage" | sed 's/.*(//;s/)//')
if [ ! "$name" ]
then
echo ""
else
echo -n "" $name;
if [ "$battery" ]
then
echo -n " ($battery%)"
fi
echo ""
fi