#!/usr/bin/env python3
+import os
import subprocess
import time
import Xlib
)
def handle_active_window_change():
+ if is_running_media_wrap():
+ return
+
window_id = get_active_window_id()
if not window_id:
focus_xfdesktop()
+def is_running_media_wrap():
+ return os.path.isfile(os.path.expanduser("~/.mediawrap.lock"))
+
def get_active_window_id():
prop = root.get_full_property(NET_ACTIVE_WINDOW, Xlib.X.AnyPropertyType)
if prop and prop.value: