Commit 98b9686
xxwhirlpool
·
2026-03-04 19:01:37 -0500 EST
parent 11462a6
finally scripted bluetooth audio profile stuff
2 files changed,
+29,
-2
+2,
-2
| ... | ... | @@ -1,11 +1,11 @@ | |
| 1 | 1 | #!/usr/bin/env bash | |
| 2 | 2 | ||
| 3 | - | if ! test -x "$(command -v exiftool)"; then | |
| 3 | + | if [[ ! "$(command -v exiftool)" ]]; then | |
| 4 | 4 | echo "missing required dependency: exiftool" | |
| 5 | 5 | exit 1 | |
| 6 | 6 | fi | |
| 7 | 7 | ||
| 8 | - | if [ $# -eq 0 ]; then | |
| 8 | + | if [[ $# -eq 0 ]]; then | |
| 9 | 9 | echo "Usage: stripexif [FILENAME]" | |
| 10 | 10 | exit 1 | |
| 11 | 11 | else |
+27,
-0
| ... | ... | @@ -0,0 +1,27 @@ | |
| 1 | + | #!/usr/bin/env bash | |
| 2 | + | # | |
| 3 | + | # borrowed from some AI slop: | |
| 4 | + | # https://gist.github.com/sanskar10100/fa2eb78bcf431cec28dde509dd797288 | |
| 5 | + | ||
| 6 | + | device_name=$(pactl list cards | grep -B 20 "device.form_factor = \"headset\"" | grep "Name" | awk '{print $2}') | |
| 7 | + | ||
| 8 | + | goodaudio() { | |
| 9 | + | pactl set-card-profile "$device_name" a2dp-sink-sbc_xq | |
| 10 | + | echo "switched to SBC-XQ" | |
| 11 | + | } | |
| 12 | + | ||
| 13 | + | micaudio() { | |
| 14 | + | pactl set-card-profile "$device_name" headset-head-unit-msbc | |
| 15 | + | echo "switched to mSBC" | |
| 16 | + | } | |
| 17 | + | ||
| 18 | + | choice() { | |
| 19 | + | choose=$(gum choose "listen" "mic") | |
| 20 | + | case "$choose" in | |
| 21 | + | *listen) goodaudio ;; | |
| 22 | + | *mic) micaudio ;; | |
| 23 | + | *) exit 1;; | |
| 24 | + | esac | |
| 25 | + | } | |
| 26 | + | ||
| 27 | + | choice |