bt_connect now accepts an argument to pass to bluetoothctl
Allows to me to setup bindings for disconnecting or connecting a bluetooth device.
This commit is contained in:
@@ -33,7 +33,10 @@ super + minus
|
|||||||
$HOME/.local/scripts/act_display "--off";
|
$HOME/.local/scripts/act_display "--off";
|
||||||
|
|
||||||
super + numbersign
|
super + numbersign
|
||||||
$HOME/.local/scripts/bt_connect;
|
$HOME/.local/scripts/bt_connect connect;
|
||||||
|
|
||||||
|
super + asciitilde
|
||||||
|
$HOME/.local/scripts/bt_connect disconnect;
|
||||||
|
|
||||||
super + underscore
|
super + underscore
|
||||||
notify-send -u normal "Turning off screentimer"; \
|
notify-send -u normal "Turning off screentimer"; \
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
choice=$(bluetoothctl devices | sed 's/Device \([A-Z0-9:]*\) \(.*\)/\2\t\1/g' | dmenu -i -p "Device: " | sed 's/.*\t//')
|
choice=$(bluetoothctl devices | sed 's/Device \([A-Z0-9:]*\) \(.*\)/\2\t\1/g' | dmenu -i -p "Device: " | sed 's/.*\t//')
|
||||||
[ ! -z $choice ] && bluetoothctl connect $choice
|
if [ ! -z $choice ]
|
||||||
|
then
|
||||||
|
bluetoothctl $1 $choice
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user