Skip to content

Instantly share code, notes, and snippets.

View MrDisguised's full-sized avatar

Rounak Dutta MrDisguised

  • West Bengal, India
  • 07:23 (UTC +05:30)
View GitHub Profile
@MrDisguised
MrDisguised / btswitch
Last active June 17, 2023 08:15 — forked from tinywrkb/btswitch
NOT NEEDED WITH 0.3.21 OR GIT VERSION | PipeWire Pulse Server Bluetooth Auto-Switch
#!/bin/bash
#
# ~/.local/bin/btswitch
#
# wait a second this is too fast for udev
sleep 1
btdev="$(pactl list sinks|grep Name|grep 'bluez.*'|sed 's/Name: //'|sed 's/\s//')"
if [ -n "$btdev" ]; then