os/script/bt

13 lines
228 B
Text
Raw Normal View History

2023-05-24 11:00:38 +02:00
case "$1" in
"connect" ) {
x=$(bluetoothctl devices | sk | sd '^Device ' '' | sd ' .+$' '') && {
bluetoothctl connect "$x"
}
};;
"disconnect" ) {
bluetoothctl disconnect
};;
* ) {
echo "unknown command"
};;
esac