Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

displaytoggle.py: Revision history

From Randomness wiki

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

12 September 2024

9 September 2024

  • curprev 21:4221:42, 9 September 2024Derg talk contribs 568 bytes +568 Created page with "<syntaxhighlight lang="python"> #!/usr/bin/python3 import win32api, win32con, argparse screenid = 1 a = argparse.ArgumentParser() a.add_argument('on', nargs="?", default=False, type=lambda x: x.lower() not in ("false", "0", "off")) b = a.parse_args() screenstring = f"\\\\.\\DISPLAY{screenid:d}" if b.on: win32api.ChangeDisplaySettingsEx(screenstring, None) else: s = win32api.EnumDisplaySettings(screenstring, win32con.ENUM_CURRENT_SETTINGS) s.PelsWidth = 0..."