#!/usr/bin/env python3 """Native wallpaper and DnD on Wayland; global glass writes go to a recording hyprctl.""" import importlib.util,json,os,shutil,struct,subprocess,tempfile,time,zlib from pathlib import Path ROOT=Path(__file__).resolve().parents[1] BASE=['quickshell','ipc','--path',str(ROOT/'quickshell'),'call'] def ipc(target,method,*args): p=subprocess.run(BASE+[target,method,*map(str,args)],text=True,capture_output=True,timeout=5) return json.loads(p.stdout) if p.returncode==0 and p.stdout.strip() else None def state():return ipc('settingsTest','snapshot') or {} def wait(fn): end=time.monotonic()+20 while time.monotonic()