Created
February 1, 2017 02:48
-
-
Save leaysgur/4f3c4977790f3f8d67467ea33ce6018f to your computer and use it in GitHub Desktop.
Toggle Bluetooth power status.
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/sh | |
# | |
# BluetoothのON/OFFをtoggle実行するスクリプト | |
# | |
# http://brewformulas.org/Blueutil に依存してます。 | |
# | |
cur=($(blueutil power)) | |
if [ "$cur" -eq "1" ] | |
then | |
# echo "Bluetooth: on -> off" | |
blueutil power 0 | |
else | |
# echo "Bluetooth: off -> on" | |
blueutil power 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Automatorでアプリ化するなら、
とかしないと
blueutil
が見つからなくて動かない。