initial commit
This commit is contained in:
13
headphone_profile_toggle.sh
Executable file
13
headphone_profile_toggle.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
SINKS=$(pacmd list-sinks)
|
||||
DEVICE="bluez_card.04_52_C7_C0_ED_BE"
|
||||
IFS=$'\r'
|
||||
|
||||
case $(echo "$SINKS" | grep 'bluetooth.protocol' | awk '{print $3}') in
|
||||
"\"a2dp_sink\"") pacmd set-card-profile $DEVICE headset_head_unit 1>/dev/null 2>&1
|
||||
;;
|
||||
"\"headset_head_unit\"") pacmd set-card-profile $DEVICE a2dp_sink 1>/dev/null 2>&1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user