aboutsummaryrefslogtreecommitdiff
path: root/src/Watcher/get_windows.py
diff options
context:
space:
mode:
authorLibravatar Waishnav <[email protected]>2022-11-14 11:03:06 +0530
committerLibravatar Waishnav <[email protected]>2022-11-14 11:05:27 +0530
commit4c214e401abc4d7d4c9a7182348b6bebf78de34a (patch)
treec2a8e787f565d1a5713807c810cb0286b3b9f56e /src/Watcher/get_windows.py
parent0386f0b5bd6a58248087ad5cf12051094277f074 (diff)
downloadshopno-os-log-sync-4c214e401abc4d7d4c9a7182348b6bebf78de34a.tar.gz
shopno-os-log-sync-4c214e401abc4d7d4c9a7182348b6bebf78de34a.zip
changed some variable names
Diffstat (limited to '')
-rwxr-xr-xsrc/Watcher/get_windows.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/Watcher/get_windows.py b/src/Watcher/get_windows.py
index c22d909..a0be469 100755
--- a/src/Watcher/get_windows.py
+++ b/src/Watcher/get_windows.py
@@ -1,12 +1,4 @@
import os
-import time
-import platform
-from afk import get_afk_status
-
-if platform.system() == 'Windows':
- from win32gui import GetWindowText, GetForegroundWindow
-elif platform.system() == 'Darwin':
- import subprocess
# get title name of app that user working on
def active_window_title():
@@ -51,5 +43,7 @@ def active_window():
def previous_window(array_of_window, active_window):
array_of_window.remove(active_window)
array_of_window.append(active_window)
- return l[-2]
+ return array_of_window[-2]
+if __name__ == "__main__":
+ print(active_window())