From 07a1c6d5c96ad7a120328f253146f744df74cfc7 Mon Sep 17 00:00:00 2001 From: Peter Date: Sun, 4 Aug 2024 16:07:50 +0100 Subject: Add rudimentary kodi bluetooth script --- .local/bin/kodi-bluetooth | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 .local/bin/kodi-bluetooth (limited to '.local/bin/kodi-bluetooth') 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 -- cgit v1.2.3