Skip to content

sulealothman/sdi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDI – Switch Display Input

1. Overview

SDI provides a simple way to switch a display's input source (HDMI / DP / VGA / DVI) using DDC/CI. The main script, switch_display_input.sh, uses a mapping file that contains display names and their I²C bus IDs. A helper script, extract_bus.sh, generates this mapping file automatically.


2. Requirements

  • Installed ddcutil
  • Give execution permission to both scripts:
chmod +x switch_display_input.sh
chmod +x extract_bus.sh

3. Usage – switch_display_input.sh

Syntax:

./switch_display_input.sh <input> [display_name]

Examples:

Switch the first display in the mapping file to HDMI 1:

./switch_display_input.sh hdmi1

Switch a specific display to DisplayPort 1:

./switch_display_input.sh dp1 OMEN_27q

Supported input values:

Argument Description
1, hdmi1 HDMI 1
2, hdmi2 HDMI 2
dp, dp1 DisplayPort 1
dp2 DisplayPort 2
vga, vga1 VGA 1
dvi, dvi1 DVI 1
  • If no display name is provided, the script uses the first entry in the mapping file.
  • If a display name is provided but not found, the script returns an error.

4. Helper Script – extract_bus.sh

You can manually generate or refresh the display bus mapping file using:

./extract_bus.sh

This script scans all connected displays and writes their names and bus IDs into monitors_bus_ids.txt. switch_display_input.sh will automatically attempt to run it if the file is missing.


About

SDI provides a simple way to switch a display's input source (HDMI / DP / VGA / DVI) using DDC/CI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages