aboutsummaryrefslogtreecommitdiff
path: root/src/Watcher
diff options
context:
space:
mode:
authorLibravatar Waishnav Deore <86405648+Waishnav@users.noreply.github.com>2022-08-25 17:50:28 +0530
committerLibravatar GitHub <noreply@github.com>2022-08-25 17:50:28 +0530
commitcd43e6c2ae541c1d5cb96f04c94f92b3f56f5735 (patch)
treeba30fd0055f8a680a8a3e3218e6c8b1629c50aba /src/Watcher
parentb530d773fe938297a235028f6f0e85a12aac0f47 (diff)
parent6b30c7f9ccff72fd0661f04cbe066653a9cc3970 (diff)
downloadshopno-os-log-sync-cd43e6c2ae541c1d5cb96f04c94f92b3f56f5735.tar.gz
shopno-os-log-sync-cd43e6c2ae541c1d5cb96f04c94f92b3f56f5735.zip
Merge pull request #14 from augustin64/patch-1
Ubuntu DE Homescreen error fixed
Diffstat (limited to 'src/Watcher')
-rwxr-xr-xsrc/Watcher/get_windows.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Watcher/get_windows.py b/src/Watcher/get_windows.py
index 19e2a3a..0769eb9 100755
--- a/src/Watcher/get_windows.py
+++ b/src/Watcher/get_windows.py
@@ -19,7 +19,9 @@ def active_window():
if len(actv_id) == 4:
active_window = ""
else:
- active_window = os.popen("xprop -id $(xdotool getwindowfocus) | grep CLASS ").read()[19:-1].replace('''"''', "").split(", ")[1]
+ active_window = os.popen("xprop -id $(xdotool getwindowfocus) | grep CLASS ").read()
+ if active_window != "":
+ active_window = active_window[19:-1].replace('''"''', "").split(", ")[1]
if "XGetWindowProperty[_NET_ACTIVE_WINDOW] failed" in active_window:
active_window = ""