os/script/bt

13 lines
No EOL
228 B
Text
Executable file

case "$1" in
"connect" ) {
x=$(bluetoothctl devices | sk | sd '^Device ' '' | sd ' .+$' '') && {
bluetoothctl connect "$x"
}
};;
"disconnect" ) {
bluetoothctl disconnect
};;
* ) {
echo "unknown command"
};;
esac