Last active
August 29, 2024 21:07
-
-
Save rwp0/fb40b2787207ec2d32056a080d144fa0 to your computer and use it in GitHub Desktop.
DDM Dell Display Manager CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ echo off | |
rem pushd C:\Program Files\Dell\Dell Display Manager 2 | |
setlocal | |
echo You passed: %1 | |
if %1 == night ( | |
set brightness=25 | |
set brightness_laptop=50 | |
set contrast=50 | |
set color=Cool | |
) else ( | |
set brightness=50 | |
set brightness_laptop=70 | |
set contrast=75 | |
set color=Cool | |
) | |
rem Dell Monitors | |
start ddm /readbrightnesslevel ^ | |
/readcontrastlevel ^ | |
/writebrightnesslevel %brightness% ^ | |
/writecontrastlevel %contrast% ^ | |
/writecolorpreset %color% ^ | |
/console start | |
rem Laptop | |
wmic /namespace:\\root\wmi ^ | |
path WmiMonitorBrightnessMethods ^ | |
where active=true ^ | |
call WmiSetBrightness Brightness=%brightness_laptop% Timeout=0 | |
endlocal | |
rem popd | |
rem https://gist.github.com/nebriv/cb934a3b702346c5988f2aba5ee39f0d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.dell.com/community/en/conversations/monitors/ddm-20-command-line-interface/647fa068f4ccf8a8de56b6a3