fix(eww): indicate when bluetooth is off
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
d465a86c9b
commit
e9aebfbb15
1 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
val=$(bluetoothctl devices Connected | wc -l)
|
||||
powered=$(bluetoothctl show | grep -i "powered" | grep -i "yes" | wc -l)
|
||||
|
||||
if [[ "$powered" -eq 1 ]]; then
|
||||
val=$(bluetoothctl devices Connected | wc -l)
|
||||
echo "(label :class \"bluetooth__label\" :text \"$val\")"
|
||||
else
|
||||
echo "(label :class \"bluetooth__label\" :text \"-\")"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue