diff options
author | davidovski <david@davidovski.xyz> | 2021-10-09 22:20:41 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2021-10-09 22:20:41 +0100 |
commit | 01ced0b7ce47d279789efb2dc70d1cd009ac56ad (patch) | |
tree | 6ece604b8ae3476d2d70c9c9d42f86fe607990da /scripts/.scripts/ddc-switch-inputs |
initial commit
Diffstat (limited to 'scripts/.scripts/ddc-switch-inputs')
-rwxr-xr-x | scripts/.scripts/ddc-switch-inputs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/.scripts/ddc-switch-inputs b/scripts/.scripts/ddc-switch-inputs new file mode 100755 index 0000000..d85fed2 --- /dev/null +++ b/scripts/.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 |