Skip to content

Commit

Permalink
Patch hd1 command for Monterey & Apple silicon.
Browse files Browse the repository at this point in the history
  • Loading branch information
drn committed Jan 7, 2022
1 parent c56e569 commit 0b5d127
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/hd1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ if [[ "$#" -ne 1 || ("$1" != "toggle" && "$1" != "status") ]]; then
fi

HD1='00-1b-66-81-af-1d' # MAC of HD1 Headphones
CMD='/usr/local/bin/blueutil'
BREW_PATH=/usr/local # Intel silicon
[ -d "/opt/homebrew" ] && BREW_PATH=/opt/homebrew # Apple silicon
CMD="$BREW_PATH/bin/blueutil"

case $1 in
toggle)
Expand All @@ -17,7 +19,7 @@ case $1 in
$CMD --connect "$HD1" >/dev/null 2>&1 &
else
echo "Disconnecting HD1..."
$CMD --disconnect "$HD1" >/dev/null 2>&1 &
$CMD --disconnect "$HD1" --info "$HD1" >/dev/null 2>&1 &
fi
;;

Expand Down

0 comments on commit 0b5d127

Please sign in to comment.