Skip to content

Commit 28e9732

Browse files
Update termux-bluetooth-connect
1 parent 06b7c8d commit 28e9732

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

scripts/termux-bluetooth-connect

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,13 @@ set -e -u
33

44
SCRIPTNAME=termux-bluetooth-connect
55
show_usage () {
6-
echo "Usage: termux-bluetooth-connect [text]"
7-
echo "Show text in a Toast (a transient popup). The text to show is either supplied as arguments or read from stdin if no arguments are given."
8-
echo " -h show this help"
9-
echo " -b set background color (default: gray)"
10-
echo " -c set text color (default: white)"
11-
echo " -g set position of toast: [top, middle, or bottom] (default: middle)"
12-
echo " -s only show the toast for a short while"
13-
echo "NOTE: color can be a standard name (i.e. red) or 6 / 8 digit hex value (i.e. \"#FF0000\" or \"#FFFF0000\") where order is (AA)RRGGBB. Invalid color will revert to default value"
6+
echo "Usage: termux-bluetooth-connect [device_uuid]"
7+
echo "Connects to a given device and uuid"
148
exit 0
159
}
1610

1711
PARAMS=""
18-
while getopts :hsc:b:g: option
19-
do
20-
case "$option" in
21-
h) show_usage;;
22-
s) PARAMS=" --ez short true";;
23-
c) PARAMS+=" --es text_color $OPTARG";;
24-
b) PARAMS+=" --es background $OPTARG";;
25-
g) PARAMS+=" --es gravity $OPTARG";;
26-
?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1;
27-
esac
28-
done
12+
2913
shift $(($OPTIND-1))
3014

3115
CMD="/data/data/com.termux/files/usr/libexec/termux-api BluetoothConnect $PARAMS"

0 commit comments

Comments
 (0)