summaryrefslogtreecommitdiff
path: root/scripts/ddc-switch-inputs
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2021-10-09 22:20:41 +0100
committerdavidovski <david@davidovski.xyz>2021-10-09 22:20:41 +0100
commit01ced0b7ce47d279789efb2dc70d1cd009ac56ad (patch)
tree6ece604b8ae3476d2d70c9c9d42f86fe607990da /scripts/ddc-switch-inputs
initial commit
Diffstat (limited to 'scripts/ddc-switch-inputs')
-rwxr-xr-xscripts/ddc-switch-inputs19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/ddc-switch-inputs b/scripts/ddc-switch-inputs
new file mode 100755
index 0000000..d85fed2
--- /dev/null
+++ b/scripts/ddc-switch-inputs
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Usage: ddc-switch-inputs 1
+case $1 in
+ 1 )
+ # Config 1: Main PC
+ OUT=("0x0f" "0x20")
+ ;;
+ 2 )
+ # Config 2: Virtual machine
+ OUT=("0x11" "0x21")
+ ;;
+ * )
+ echo "Unknown input '$1'"
+ exit 1
+ ;;
+esac
+
+ddcutil --bus=5 setvcp 60 ${OUT[0]} &
+wait