aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/.local/scripts/status')
-rwxr-xr-xScripts/.local/scripts/status/bluetooth-status8
1 files changed, 7 insertions, 1 deletions
diff --git a/Scripts/.local/scripts/status/bluetooth-status b/Scripts/.local/scripts/status/bluetooth-status
index c34694c..6de5422 100755
--- a/Scripts/.local/scripts/status/bluetooth-status
+++ b/Scripts/.local/scripts/status/bluetooth-status
@@ -1,9 +1,15 @@
#!/usr/bin/env sh
name=$(bluetoothctl info | grep "Name" | sed 's/.*Name: //')
+battery=$(bluetoothctl info | grep "Battery" | sed 's/.*(//;s/)//')
if [ ! "$name" ]
then
echo ""
else
- echo "" $name;
+ echo -n "" $name;
+ if [ "$battery" ]
+ then
+ echo -n " ($battery%)"
+ fi
+ echo ""
fi