1
0
Fork 0

fix(eww): indicate when bluetooth is off

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2024-02-23 14:49:34 -05:00
parent d465a86c9b
commit e9aebfbb15
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47

View file

@ -1,5 +1,10 @@
#!/usr/bin/env bash #!/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\")" echo "(label :class \"bluetooth__label\" :text \"$val\")"
else
echo "(label :class \"bluetooth__label\" :text \"-\")"
fi