A dynamic, TUI-based display control tool that allows you to manage monitor settings via DDC/CI commands. Built in Go with Bubbletea for an interactive terminal interface.
- 🎯 Dynamic Configuration: Auto-generate configs from your monitor's capabilities
- 📋 Interactive TUI: Navigate settings with an intuitive menu interface
- 🔍 Dry-run Mode: Preview commands before executing
- 🎨 Breadcrumb Navigation: Track your location in nested menus
- ⚡ Single Binary: No runtime dependencies except
ddcutil
- ✅ Error Handling: Clear feedback on command success/failure
- Linux system with I2C support
ddcutil
installed and configured- Go 1.23+ (for building from source)
# Debian/Ubuntu
sudo apt install ddcutil
# Fedora
sudo dnf install ddcutil
# Arch
sudo pacman -S ddcutil
Add your user to the i2c
group:
sudo usermod -aG i2c $USER
Load the i2c-dev module:
sudo modprobe i2c-dev
echo "i2c-dev" | sudo tee /etc/modules-load.d/i2c-dev.conf
git clone https://github.com/clobrano/DisplayControl
cd DisplayControl
make build
sudo make install
Generate a configuration file from your monitor's capabilities:
dispctl --generate
This creates a configuration file at ~/.config/display-control/config.yaml
.
For multi-monitor setups, specify the display:
dispctl --generate --display 1
dispctl
Use a custom configuration file:
dispctl --file /path/to/config.yaml
Preview commands without executing them:
dispctl --dry-run
dispctl --version # Show version
dispctl --help # Show help
The configuration file is generated from ddcutil capabilities
output and follows this structure:
brightness:
_code: "0x10"
_description: "Brightness"
values:
"0": "0x00"
"50": "0x32"
"100": "0x64"
input_source:
_code: "0x60"
_description: "Input Source"
values:
HDMI-1: "0x11"
DisplayPort-1: "0x0f"
_code
: VCP feature code in hex format_description
: Human-readable feature descriptionvalues
: Map of setting names to hex values
See examples/sample-config.yaml
for a complete example.
- ↑/↓ or j/k: Navigate menu items
- Enter: Select item / Execute command
- b or Esc: Go back one level
- r: Return to root menu
- q or Ctrl+C: Quit
Flag | Short | Description |
---|---|---|
--generate |
-g |
Generate config from ddcutil capabilities |
--file PATH |
-f |
Specify custom config file path |
--dry-run |
-d |
Preview commands without executing |
--display ID |
Specify display ID for ddcutil | |
--version |
-v |
Show version information |
--help |
-h |
Show help message |
If you get permission errors:
-
Ensure you're in the
i2c
group:groups $USER
-
Load the i2c-dev module:
sudo modprobe i2c-dev
-
Log out and back in for group changes to take effect
Install ddcutil for your distribution (see Prerequisites section).
Your monitor may not support DDC/CI or the feature list is empty. Check with:
ddcutil capabilities
If you see "Cannot open I2C device":
- Check that
/dev/i2c-*
devices exist - Verify i2c-dev module is loaded:
lsmod | grep i2c_dev
- Check permissions:
ls -l /dev/i2c-*
make test
make build
make clean
DisplayControl/
├── cmd/
│ └── dispctl/
│ └── main.go # CLI entry point
├── internal/
│ ├── config/
│ │ ├── config.go # YAML configuration parsing
│ │ └── config_test.go
│ ├── parser/
│ │ ├── capabilities.go # ddcutil capabilities parser
│ │ └── capabilities_test.go
│ ├── generator/
│ │ ├── generator.go # Configuration generator
│ │ └── generator_test.go
│ ├── ddcutil/
│ │ ├── executor.go # DDC/CI command executor
│ │ └── executor_test.go
│ ├── ui/
│ │ ├── menu.go # Bubbletea TUI
│ │ └── menu_test.go
│ └── version/
│ └── version.go # Version information
├── examples/
│ └── sample-config.yaml # Example configuration
├── Makefile
└── README.md
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.