Skip to content

Instantly share code, notes, and snippets.

@rwp0
Last active August 29, 2024 21:07
Show Gist options
  • Save rwp0/fb40b2787207ec2d32056a080d144fa0 to your computer and use it in GitHub Desktop.
Save rwp0/fb40b2787207ec2d32056a080d144fa0 to your computer and use it in GitHub Desktop.
DDM Dell Display Manager CLI
@ 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
@rwp0
Copy link
Author

rwp0 commented Aug 26, 2024

DDM 2.0 CLI (command line interface)

WriteActiveInput [DVI2/HDMI/DP2,etc] = switches active input
ReadActiveInput [DVI2/HDMI/DP2,etc] = switches active input
RestoreFactoryDefaults = restores factory defaults
AutoSetup = executes an autosetup (analog only)
ReadColorPreset = read the current color preset
WriteColorPreset = set the color preset
RestoreLevelDefaults = restores level defaults
RestoreColorDefaults = restores color defaults
WriteBrightnessLevel X = sets brightness to X% (0-100)
ReadBrightnessLevel X = sets brightness to X% (0-100)
WriteContrastLevel X = sets contrast to X% (0-100)
ReadContrastLevel X = sets contrast to X% (0-100)
WritePowerMode [on/off/standby] = sets the display power mode (standby should be used for central control.)
WriteOptimalResolution = switches to optimal resolution
WriteEALayout [X] = changes Easy Arrange grid type to X (0-48) where 0 is to turn off EA layout
Rescan = rescans display hardware
ReadControl X Y = sets hex control X to hex value Y
WriteControl X Y = sets hex control X to hex value Y
IncreaseControl X Y = increases the value of control X by Y
DecreaseControl X Y = decreases the value of control X by Y
WritePxP [Off/PiP/PBP Main Sub1] = Change PIP/PBP settings
WriteSubInput [DP1, DP2, HDM1... etc}] = Change the subinput
SwapVideo = Swaps the main (primary and sub inputs between 2 PCs
SwapUSB = swaps the usb inputs on the main and sub inputs (for 2 PBP mode only)
Zoom = switches between PxP and fullscreen mode
Exit = terminates the program

https://www.dell.com/community/en/conversations/monitors/ddm-20-command-line-interface/647fa068f4ccf8a8de56b6a3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment