summaryrefslogtreecommitdiffstats
path: root/.local/bin/kodi-bluetooth
diff options
context:
space:
mode:
authorPeter2024-08-04 16:07:50 +0100
committerPeter2024-08-04 16:07:50 +0100
commit07a1c6d5c96ad7a120328f253146f744df74cfc7 (patch)
tree13e3035dbbb209641eb193fe39da3c843ccf7ff2 /.local/bin/kodi-bluetooth
parenta28512ad5281bcac3553afec02aea3705b28bd38 (diff)
downloaddotfiles-07a1c6d5c96ad7a120328f253146f744df74cfc7.tar.gz
dotfiles-07a1c6d5c96ad7a120328f253146f744df74cfc7.tar.bz2
dotfiles-07a1c6d5c96ad7a120328f253146f744df74cfc7.zip
Add rudimentary kodi bluetooth script
Diffstat (limited to '.local/bin/kodi-bluetooth')
-rwxr-xr-x.local/bin/kodi-bluetooth11
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