#!/usr/bin/env python3 """Test-only Game Mode adapter. Records requests; never calls hyprctl or D-Bus.""" import json,os,sys from pathlib import Path base=Path(os.environ['GLASSMXRPH_SYSTEM_EVENTS']).with_suffix('.gamemode') req=json.loads(sys.argv[1]) with base.open('a') as f:f.write(json.dumps(req)+'\n') print(json.dumps({'ok':True,'active':req.get('action')=='on'}))