toy / blueutil

CLI for bluetooth on OSX: power, discoverable state, list, inquire devices, connect, info, …
https://github.com/toy/blueutil
Other
1.01k stars 53 forks source link

Explain keyboard shortcut creation #22

Closed jannikmi closed 5 years ago

jannikmi commented 5 years ago

I guess many users want to use this package to create a keyboard shortcut for automatically switching bluetooth on and off. Why not include the instructions for doing so in the readme (or somewhere else)? Something like:

To create a keyboard shortcut that toggles bluetooth:

MacOS: Install blueutil Start Automator, and create a new Quick Action (Service). Set "Service receives selected: to "no input" in "any application". Add an action named "Run Shell Script". It's in the Utilities section of the Actions Library. Insert this bash command into the text box:

/usr/local/bin/blueutil -p toggle

Test run it using the Run button (top right). Save it, giving it a service name you can remember. Go to System Preferences -> Keyboard, and go to the Shortcuts tab Go to the Services section, and scroll down to General - you should find your service there. If you select the line, you can click "add shortcut" and give it a keyboard shortcut.

Linux: [...]

Windows: [...]

toy commented 5 years ago

Interesting idea. I'm a bit hesitant about readme file itself (it is a CLI tool), but there is wiki on github or an FAQ or "usage ideas" file can be added and linked from readme. What do you think?

jannikmi commented 5 years ago

all sound fine. perhaps one could reference the "usage ideas" file in the wiki and FAQ (use all 3 options). My solution above only includes MacOS by the way. Not sure how to achieve this with other OS.

toy commented 5 years ago

Maybe the simplest way is to start with a wiki page, would you like to create it?

jannikmi commented 5 years ago

I just did: https://github.com/toy/blueutil/wiki Unfortunately I am not able to put more work into in right now.

toy commented 5 years ago

Thanks! Please tell why did you add Linux/Windows sections? blueutil is not cross-platform and there is no plan to make it cross-platform.

jannikmi commented 5 years ago

fixed it. of course that did not make sense in the wiki of this package!