Toggle Bluetooth using Quicksilver and AppleScript
Mar 30, '07 07:30:03AM
Contributed by: berdan
I was looking for a way to reduce the amount of clutter in my menu bar and decided the Bluetooth icon was a suitable target. I wanted two things:
- The current Bluetooth status displayed on my Desktop
- An easy way to toggle Bluetooth on and off
An older hint suggested using blueutil for controlling the Bluetooth daemon in OS X. This nifty little program can both show and set the status of the Bluetooth radio receiver. To display the current Bluetooth status on the Desktop, I use GeekTool with the following shell command:
/usr/local/bin/blueutil status | awk '{print "BT: " $2}'
To toggle Bluetooth on and off, and show a Growl notification, I created this AppleScript. This script is then placed in a directory that is scanned by Quicksilver; I used ~/Library/Scripts. It can then be quickly called with a few keystrokes.
[robg adds: This hint doesn't require Quicksilver; you could use another launcher, or even just keep the script in your dock, toolbar, or sidebar.]
Comments (7)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20070328181324855