Do this at your own risk. Not every monitor will react well to programmatically changing the current port. First of all, check out the possible problems depending on your monitor!
This is an example of how to list things you need to use the software and how to install them.
- cmake >= 3.23. https://cmake.org/download/
- Clone a repository
- Initialize build directory
mkdir release && cd $_ cmake.exe -DCMAKE_BUILD_TYPE=Release ../
- Build project from root
cmake.exe --build ./release --target monitor_input_switch -j 16
switch[.exe] --monitor <ID> --code <CODE>
ID
- is a monitor code that can be retrieved from switch[.exe] --list
command;
CODE
- is a hex code of your monitor input. table of possible values is given below:
The possible value is in range from 0 to 12 (in hex). if you don't know the desired value, you can always enumerate through all.
- 01 - D-SUB/VGA;
- 03 - DVI;
- 04 - HDMI;
- 11 - HDMI;
- 0F - DISPLAY PORT.
switch[.exe] --list (displays all monitors whose can be set)
switch[.exe] --help