Python script designed to enable seamless switching between two different monitor input sources through the use of a customizable hotkey.
- Clone the repository
- Install the required packages using
pip install -r requirements.txt - Setup settings in
SETTINGSconstants:
{
"monitors": [
{
"model": "VP249QGR",
"input_source_1": "DP1",
"input_source_2": "HDMI1",
"monitor_index": 1
},
{
"model": "24G2HE5",
"input_source_1": "HDMI1",
"input_source_2": "ANALOG1",
"monitor_index": 2
},
{
"model": "24G2HE5",
"input_source_1": "HDMI2",
"input_source_2": "ANALOG1",
"monitor_index": 3
}
],
"hot_keys": {
"toggle_monitors": "<ctrl>+<shift>+]",
"exit": "<ctrl>+<shift>+8"
}
}If you are unsure of the monitor index, run python input_source_switcher.py --list to list all connected monitors and their index.
- Copy the
input_source_switcher.pyfile to windows startup folderC:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startupor open the run dialog and typeshell:startupand press enter - Rename the script to
input_source_switcher.pywto run it in the background - Restart the computer
To change back to the previous input source from the other computer, you will need to run the script on that computer as well.
--list- Lists all connected monitors and their index