From 01ced0b7ce47d279789efb2dc70d1cd009ac56ad Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 9 Oct 2021 22:20:41 +0100 Subject: initial commit --- scripts/.scripts/ddc-switch-inputs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 scripts/.scripts/ddc-switch-inputs (limited to 'scripts/.scripts/ddc-switch-inputs') 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 -- cgit v1.2.1