Last active
August 29, 2015 14:25
-
-
Save z448/4ecd34bcd9e0a03188ea to your computer and use it in GitHub Desktop.
logitech k760 keyboard setup for ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # setting up logitech k760 on ubuntu | |
| # bluez-hcidump-2.5.tar.xz [http://www.bluez.org/download/] | |
| # usage: sudo ./k760-setup-ubuntu.sh | |
| function scan { | |
| hcitool scan > $fl | |
| } | |
| if [ -f "$PWD/760.mac" ]; then | |
| fl="$PWD/760.mac" | |
| scan | |
| K760=$(cat $fl | grep -i K760 | cut -d ' ' -f1) | |
| K760mac=$(echo $K760 | cut -d' ' -f1) | |
| else | |
| touch $PWD/760.mac | |
| scan | |
| K760=$(cat 760.mac | grep -i K760 | cut -d' ' -f1) | |
| K760mac=$(echo $K760 | cut -d' ' -f1) | |
| fi | |
| sleep 15 | |
| sudo bluez-simple-agent hci0 $K760mac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment