Skip to content

YuriyN/ddcmenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DDC Menu

A simple Linux CLI app for switching inputs on DDC/CI-supported monitors. It uses ddcutil and includes an interactive ncurses menu.

Requirements

  • Linux
  • ddcutil
  • DDC/CI enabled in the monitor settings
  • Access to /dev/i2c-*
  • CMake 3.16+, a C++17 compiler, and ncurses development files to build

Install ddcutil and the ncurses headers with your package manager:

# Arch Linux
sudo pacman -S ddcutil ncurses

# Debian / Ubuntu
sudo apt install ddcutil libncurses-dev

# Fedora
sudo dnf install ddcutil ncurses-devel

Load the I2C module and grant your user device access if needed:

sudo modprobe i2c-dev
sudo usermod -aG i2c "$USER"

Log out and back in after changing groups.

Build

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failure
sudo cmake --install build

Usage

ddcmenu                 # interactive menu
ddcmenu dp-1            # DisplayPort 1
ddcmenu dp-2            # DisplayPort 2 (standard VCP value 0x10)
ddcmenu hdmi-1          # HDMI 1
ddcmenu hdmi-2          # HDMI 2
ddcmenu usb-c           # USB-C
ddcmenu auto            # automatic input selection
ddcmenu --current       # show current input
ddcmenu --detect        # list detected monitors
ddcmenu --doctor        # diagnose setup problems
ddcmenu --list          # list known input values

When one compatible monitor is detected, it is selected automatically. With multiple monitors, use the interactive menu or select one explicitly:

ddcmenu dp-1 --display 2
ddcmenu dp-1 --bus 4
ddcmenu dp-1 --serial ABC123
ddcmenu dp-1 --monitor "Display Model"

Input-source values vary between monitor models. Use ddcmenu --list for the built-in mappings or pass a raw VCP value such as 0x0f.

The interactive menu asks the selected monitor for its advertised VCP 0x60 values and shows only those inputs when possible. Monitor capability strings are not always accurate, so the menu falls back to the built-in mappings and raw values remain available.

Run ddcutil detect if a monitor does not appear.

About

Linux CLI to switch inputs on DDC/CI-supported monitors via ddcutil, with interactive ncurses menu. Switch between DisplayPort, HDMI, USB-C, or auto-select. Supports multi-monitor setups (by display index, bus, serial, or model), raw VCP values, and includes --detect/--doctor diagnostics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors