mac os tips

Remove .DS_Store and .AppleDouble

#!/usr/bin/env bash

find ./ -depth -name ".DS_Store" -exec rm {} \;
find ./ -depth -name ".AppleDouble" -exec rm -Rf {} \;

Sonoma 14.4.1 Keyboard switcher

(https://discussions.apple.com/thread/255161577?sortBy=best)

defaults write kCFPreferencesAnyApplication TSMLanguageIndicatorEnabled 0

Sonoma 14.4.1 Enable AptX and AAC codecs for Bluetooth

Used for Bowers Wilkins(B&W) PX7 S2e headphones

(https://gist.github.com/dvf/3771e58085568559c429d05ccc339219)

A2DP configured at 44.1 KHz. Codec: AAC-LC, VBR max: 256 kbps. 1 frames * (12+744) bytes = 756 per RTP (max=879) every 23.22 ms

Enabled:
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true
sudo defaults write bluetoothaudiod "Enable AAC codec" -bool true

Verify with:
sudo defaults read bluetoothaudiod

Don't forget to reset the bluetoothd daemon:
sudo pkill bluetoothd

or 
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist

github.com