wip waybar and swaync updates
This commit is contained in:
parent
d1053b6282
commit
69de4ca87b
11 changed files with 124 additions and 15 deletions
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
devices=$(bluetoothctl devices | awk '{print $2, $3}')
|
||||
|
||||
if [ -z "$devices" ]; then
|
||||
options=" Power On\n Scan for devices"
|
||||
else
|
||||
options="$devices\n Power Off\n Scan for devices"
|
||||
fi
|
||||
|
||||
chosen=$(echo -e "$options" | wofi --dmenu --location 3 --yoffset 40 --xoffset -20 -p "Bluetooth")
|
||||
|
||||
case "$chosen" in
|
||||
" Power On") bluetoothctl power on;;
|
||||
" Power Off") bluetoothctl power off;;
|
||||
" Scan for devices") bluetoothctl scan on;;
|
||||
*)
|
||||
mac=$(echo "$chosen" | awk '{print $1}')
|
||||
bluetoothctl connect "$mac"
|
||||
;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue