Skip to content

1Filipek2/display-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Display Switcher

A simple Python script for quickly switching the screen resolution between two preset values.

I use it only to quickly change my resolution when I want to play CS2, so it matches my in-game resolution.

How It Works

The script checks the current monitor resolution, compares it with two preset values, and switches it to the other saved resolution.

  • If the first resolution is currently active, it switches to the second one.
  • If the second one is active, it switches back to the first one.

Setup

To make the script run with a single PowerShell command, add a custom function to your PowerShell profile.

  1. If the profile does not exist yet, create it and open it:
if (!(Test-Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force }
notepad $PROFILE
  1. Add a function like this:
function disp { & "PATH_TO_PYTHONW" "PATH_TO_SCRIPT" }
  1. Replace:
  • PATH_TO_PYTHONW with the path to pythonw.exe inside the virtual environment.
  • PATH_TO_SCRIPT with the path to the Python script.

Running It

After saving the PowerShell profile, start the script with:

disp

This allows the script to run instantly without opening the project manually.

Note

Personal file paths and folder names are intentionally hidden in this README.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages