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 @@
11 #!/usr/bin/env bash
22
3-if ! test -x "$(command -v exiftool)"; then
3+if [[ ! "$(command -v exiftool)" ]]; then
44 echo "missing required dependency: exiftool"
55 exit 1
66 fi
77
8-if [ $# -eq 0 ]; then
8+if [[ $# -eq 0 ]]; then
99 echo "Usage: stripexif [FILENAME]"
1010 exit 1
1111 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