frues-clan/users/pedro/home-configuration/scripts/scripts/ddcmonitorctl.sh
Pedro Rey Anca 7606f9e051
Some checks failed
Update `flake.lock` / update_lockfile (push) Waiting to run
Flake check / check (push) Has been cancelled
Migrate config (frues-pc machine for now) from https://git.peprolinbot.com/peprolinbot/nixos-config, with improvements
2025-09-08 18:59:28 +02:00

14 lines
No EOL
295 B
Bash
Executable file

if [ "$1" == "on" ]; then
state_opt=1
elif [ "$1" == "off" ]; then
state_opt=4
else
echo "First argument must be either 'on' or 'off'"
exit 1
fi
monitor_count=$(bash -c "ddcutil detect | grep Display | wc -l")
seq "$monitor_count" | xargs -n 1 ddcutil setvcp d6 $state_opt -d