Skip to content

Commit

Permalink
Windows 11 terminal window size fix
Browse files Browse the repository at this point in the history
  • Loading branch information
scottjsh committed Mar 31, 2024
1 parent 2a80d71 commit 1e2da8a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@

#os.system("mode con cols=200 lines=50")

import pygetwindow
win = pygetwindow.getWindowsWithTitle(title_with_version)[0]
win.size = (1536, 864)
#import pygetwindow
#win = pygetwindow.getWindowsWithTitle(title_with_version)[0]
#win.size = (1536, 864)

import pywintypes
import win32gui
hwnd = win32gui.FindWindow(None, title_with_version)
x0, y0, x1, y1 = win32gui.GetWindowRect(hwnd)
win32gui.MoveWindow(hwnd, x0, y0, x0+1536, y0+864, True)

def program_exit(status: int): # so we don't need to import the entire sys module
log(f"exited program with error code {status}")
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ urllib3==2.0.7
wcwidth==0.2.6
websocket-server==0.6.4
websockets==11.0.3
pygetwindow==0.0.9
pywin32
2 changes: 1 addition & 1 deletion src/constants.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import requests
from colr import color

version = "3.50"
version = "3.80"
enablePrivateLogging = True
hide_names = True
hide_levels = True
Expand Down

0 comments on commit 1e2da8a

Please sign in to comment.