m1ddc Documentation

repository·main·Indexed 20 days ago

https://github.com/waydabber/m1ddc

A command-line tool for controlling external displays via DDC/CI on Apple Silicon Macs. m1ddc allows users to manage brightness, contrast, volume, inputs, and specialized features like KVM or PBP through a CLI. It supports targeting specific displays via UUID, ID, or EDID and provides commands to set, get, and relatively change display properties.

Tokens
1.1K
Snippets
3
Records
4
Agent score
22%

What's inside m1ddc

  1. Install m1ddc

    main

    To install m1ddc, ensure you have clang from Apple's Command Line Tools installed. After downloading the source, compile it using make in your terminal.

    Prerequisites:

    • Apple Silicon Mac (Note: This tool does not support Intel Macs).
    • clang (part of Apple's Command Line Tools).
    make
  2. Use m1ddc to control display settings

    main

    The m1ddc CLI allows you to control external displays via DDC/CI. You can target the default display by omitting a display identifier, or target specific displays using their list number or a unique identifier (like UUID).

    Common Tasks:

    • Set values: Use set <property> <value> (e.g., set contrast 5).
    • Get values: Use get <property> (e.g., get luminance).
    • Relative changes: Use chg <property> <delta> (e.g., chg volume -10).
    • List displays: Use display list to see connected displays.

    Note: You can use shorthand aliases like l for luminance and v for volume.

    # Sets contrast to 5 on default display
    m1ddc set contrast 5
    
    # Returns current luminance on default display
    m1ddc get luminance
    
    # Decreases volume by 10 on default display
    m1ddc chg volume -10
    
    # Lists displays
    m1ddc display list
    
    # Sets volume to 50 on Display 1
    m1ddc display 1 set volume 50
    
    # Sets input to DisplayPort 1 on a specific display via UUID
    m1ddc display 10ACB8A0-0000-0000-1419-0104A2435078 set input 15
  3. Reference: m1ddc command options

    main

    The following commands are available for the default display or a selected display. Most properties accept values between 0 and the maximum (usually 100).

    Set Commands

    • set luminance n: Sets brightness.
    • set contrast n: Sets contrast.
    • set (red|green|blue) n: Sets color-channel gain.
    • set volume n: Sets volume.
    • set input n: Sets input source (e.g., 15 for DisplayPort 1).
    • set input-alt n: Sets input source using alternate VCP codes (common for LG displays).
    • set mute on|off: Enables/disables mute (use 1 for on, 2 for off).
    • set pbp n: Configures PIP/PBP (Dell displays).
    • set pbp-input n: Sets secondary PIP/PBP input (Dell displays).
    • set kvm n: Controls KVM (Dell displays).
    • set asus-kvm n: Selects USB upstream (ASUS displays).

    Get Commands

    • get luminance | contrast | (red|green|blue) | volume: Returns current value.

    Max Commands

    • max luminance | contrast | (red|green|blue) | volume: Returns maximum supported value.

    Change Commands (Relative)

    • chg luminance n | contrast n | (red|green|blue) n | volume n: Adjusts value by n (requires support for current/max reading).
    # Example of the command structure provided in documentation
    set luminance n
    set contrast n
    set (red|green|blue) n
    set volume n
    set input n
    set input-alt n
    set mute on|off
    set pbp n
    set pbp-input n
    set kvm n
    set asus-kvm n
    
    get luminance
    get contrast
    get (red|green|blue)
    get volume
    
    max luminance
    max contrast
    max (red|green|blue)
    max volume
    
    chg luminance n
    chg contrast n
    chg (red|green|blue) n
    chg volume n
  4. Identify displays using different methods

    main

    When targeting a specific display, you can use display <identifier> <command>. The default identification method is uuid. You can find available attributes by running m1ddc display list detailed.

    Supported identification methods:

    • id: <display_id>
    • uuid: <system_uuid> (default)
    • edid: <edid_uuid>
    • seid: <alphnum_serial>:<edid_uuid>
    • basic: <vendor>:<model>:<serial>
    • ext: <vendor>:<model>:<serial>:<manufacturer>:<alphnum_serial>:<product_name>
    • full: <vendor>:<model>:<serial>:<manufacturer>:<alphnum_serial>:<product_name>:<io_location>