1
0
Fork 0
dotfiles/dot_config/polybar/scripts/executable_polybar_bluetooth_speaker.sh
Florian RICHER 3ff2e6e742 Update dot_config/polybar/custom_modules.ini
Add dot_config/polybar/scripts/executable_beep.sh
Add dot_config/polybar/scripts/executable_colors.sh
Add dot_config/polybar/scripts/executable_colors.sh.base
Add dot_config/polybar/scripts/executable_launch_polybar
Add dot_config/polybar/scripts/executable_michurin
Add dot_config/polybar/scripts/executable_polybar_bluetooth_speaker.sh
Add dot_config/polybar/scripts/executable_polybar_custom_time.sh
Add dot_config/polybar/scripts/executable_polybar_dunst_indicator.sh
Add dot_config/polybar/scripts/executable_polybar_healthbar.sh
Add dot_config/polybar/scripts/executable_polybar_michurin.py
Add dot_config/polybar/scripts/executable_polybar_net_indicator.sh
Add dot_config/polybar/scripts/executable_polybar_net_speed.sh
Add dot_config/polybar/scripts/executable_polybar_redshift_indicator.sh
Add dot_config/polybar/scripts/executable_polybar_wifibar.sh
Add dot_config/polybar/scripts/executable_refresh_wpg_wallpapers
Add dot_config/polybar/scripts/executable_regkernel
Add dot_config/polybar/scripts/executable_setbg
Add dot_config/polybar/scripts/executable_theme.sh
Add dot_config/polybar/scripts/executable_transmission_indicator.sh
Add dot_config/polybar/scripts/executable_tresorit_indicator.sh
2022-05-06 22:55:24 +02:00

21 lines
649 B
Bash

#!/bin/bash
# Bluetooth speaker indicator for polybar.
# Change the MAC address to the MAC of your speaker, after it is paired.
# I cannot guarantee it will work for you. This script does nothing to
# actually connect to the speaker, it only displays a status icon.
#
# Author: machaerus
# https://gitlab.com/machaerus
source colors.sh
bluetooth_speaker() {
SPEAKER_CONNECTED=$(bt-device -i 78:44:05:F6:E9:15 | grep Connected | xargs | cut -d ' ' -f 2)
if [ "$SPEAKER_CONNECTED" -eq 1 ]; then
speaker_indicator="${faded_green}${RESET}"
else
speaker_indicator="${dark0_soft}${RESET}"
fi
echo $speaker_indicator
}
# bluetooth_speaker