diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dbe9c82 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ \ No newline at end of file diff --git a/README.md b/README.md index 20e01a3..1d617a9 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,6 @@ Default timer is 3 minutes, but can be 1 or more. # Dependencies This software uses PyAutoGui https://github.com/asweigart/pyautogui as the driver behind the movement. +In addition, screeninfo is needed https://pypi.org/project/screeninfo/ to determine primary monitor resolution. > Optional- Create Virtual Env Step: ``` python3 -m venv ./StayAwake ``` > ``` pip install -r requirements.txt ``` diff --git a/requirements.txt b/requirements.txt index 1c4fdc4..b6ca450 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ pyautogui - +screeninfo diff --git a/src/awake.py b/src/awake.py index 4360295..9b180df 100644 --- a/src/awake.py +++ b/src/awake.py @@ -2,20 +2,45 @@ import time import sys from datetime import datetime +from screeninfo import get_monitors pyautogui.FAILSAFE = False numMin = None -if ((len(sys.argv)<2) or sys.argv[1].isalpha() or int(sys.argv[1])<1): +xDirection = 0 +aspectRatio = 0 + +if ((len(sys.argv) <2) or sys.argv[1].isalpha() or int(sys.argv[1])<1): numMin = 3 else: numMin = int(sys.argv[1]) -while(True): - x=0 - while(x