switch alias and battery pos in bluetooth indicator

This commit is contained in:
Yash Karandikar 2024-03-13 23:25:28 -05:00
parent 9bb3469dc6
commit 4bcd0b116e

View file

@ -5,9 +5,9 @@ then
echo -e "%{F#66ffffff}\uf293"
elif [ $(echo info | bluetoothctl | grep 'DeviceSet' | wc -c) -eq 0 ]
then
BAT=$(bluetoothctl info | grep Percentage | cut -d":" -f 2 | cut -d"(" -f 2 | sed 's/)/%/' | sed 's/^/ /')
ALIAS=$(bluetoothctl info | grep Alias | cut -d":" -f 2 | xargs echo -n)
echo -e "%{F#81a1c1}\uf293%{F#ffffff}$BAT ($ALIAS)"
BAT=$(bluetoothctl info | grep Percentage | cut -d":" -f 2 | cut -d"(" -f 2 | sed 's/)/%/')
ALIAS=$(bluetoothctl info | grep Alias | cut -d":" -f 2)
echo -e "%{F#81a1c1}\uf293%{F#ffffff}$ALIAS ($BAT)"
else
echo -e "\uf293"
fi