1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-27 05:28:37 -06:00

improved bluetooth-toggle

This commit is contained in:
Sayantan Santra 2021-12-08 19:35:57 -06:00
parent 23517fffbf
commit 9c3bc63776

View file

@ -6,5 +6,8 @@
if [ $(bluetoothctl show | grep Powered | grep -c yes) -eq 1 ]; then if [ $(bluetoothctl show | grep Powered | grep -c yes) -eq 1 ]; then
bluetoothctl power off bluetoothctl power off
else else
if [ $(rfkill --output-all | grep bluetooth | grep -c blocked) -ne 0 ]; then
rfkill unblock bluetooth
fi
bluetoothctl power on bluetoothctl power on
fi fi