diff options
-rwxr-xr-x | .local/bin/kodi-bluetooth | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/.local/bin/kodi-bluetooth b/.local/bin/kodi-bluetooth new file mode 100755 index 0000000..5e31ad0 --- /dev/null +++ b/.local/bin/kodi-bluetooth @@ -0,0 +1,11 @@ +#!/bin/sh + +ssh=htpc + +ssh $ssh systemctl stop kodi +ssh $ssh pactl load-module module-udev-detect +output=$(ssh $ssh pactl list short sinks | awk '/^1/ {print $2}') +ssh $ssh pactl set-default-sink "$output" +input=$(ssh $ssh pactl list short sources | awk '/bluez/ {print $2}') +ssh $ssh pactl set-default-source "$input" +ssh $ssh systemctl start kodi |