Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # List ble devices in rofi
- ROFIRESULT=$(bluetoothctl devices | cut -f 2- -d ' ' | sed -r 's/\s+/;/' | rofi -dmenu -i -p "Focus on window")
- # Read id of device selected in rofi
- IFS=';' read -ra RESSPLIT <<< "$ROFIRESULT"
- # Connect and pipe output to notify-send
- # bluetoothctl connect "$RESSPLIT" #| xargs -n1 -d '\n' notify-send
- # notify-send "$(bluetoothctl connect "$RESSPLIT")"
- bluetoothctl connect "$RESSPLIT" | while read -r BTOUTPUT; do notify-send "$BTOUTPUT"; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement