Add 'dots/' from commit 'f64b634dd8fbb2c8a2898c3b9d0acc9452e4d966'
git-subtree-dir: dots git-subtree-mainline:2ad98cde17git-subtree-split:f64b634dd8
This commit is contained in:
11
dots/.bin/toggle-bt-device
Executable file
11
dots/.bin/toggle-bt-device
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
status="$(bluetoothctl info "$1" | grep Connected | cut -f 2 -d ':' | cut -f 2 -d ' ')"
|
||||
|
||||
if [ "$status" == "yes" ]
|
||||
then
|
||||
bluetoothctl disconnect "$1"
|
||||
else
|
||||
trust "$1"
|
||||
bluetoothctl connect "$1"
|
||||
fi
|
||||
Reference in New Issue
Block a user