Skip to content

Instantly share code, notes, and snippets.

@tinywrkb
tinywrkb / btswitch
Last active Jan 31, 2021
NOT NEEDED WITH 0.3.21 OR GIT VERSION | PipeWire Pulse Server Bluetooth Auto-Switch
View btswitch
#!/bin/bash
#
# ~/.local/bin/btswitch
#
# wait a second this is too fast for udev
sleep 1
btdev="$(pactl list sinks|grep Name|grep 'bluez.*.a2dp.sink'|sed 's/Name: //'|sed 's/\s//')"
if [ -n "$btdev" ]; then