Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- nl='\n'
- devices=$(echo list | bluetoothctl | grep Device | cut -d' ' -f5-)
- # DEBUG LINE:
- echo "$(echo list | bluetoothctl)" | rofi -dmenu
- menu="${devices}${nl}Disconnect"
- cmd="$(echo "$menu" | rofi -dmenu -p bluetooth)"
- case $cmd in
- Disconnect) echo disconnect | bluetoothctl ;;
- *) echo connect $(echo list | bluetoothctl | grep "$cmd" | cut -d' ' -f4) | bluetoothctl ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement