Files
mxandClaude Opus 5.5 99e64a7713 Add glassMxrph shell sources
Initial commit of the Quickshell desktop suite: bar, dock, launcher,
settings, Control Center, dashboard, OSD, lock screen, desktop widgets,
plugin host with the vendored Noctalia/Omarchy compatibility layer,
helpers, packaging, tests and phase documentation.

Includes the optimization work so far: usage widgets and dashboard
gauges no longer animate continuously, desktop widgets pause while
covered, system controls stop flickering on background polls, dock app
matching uses an indexed catalog, and workspace ghosts are created only
for occupied slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:36:17 +02:00

19 lines
1.2 KiB
Python

#!/usr/bin/env python3
"""Test-only system adapter. Never executes commands or accesses system buses."""
import json,os,sys
from pathlib import Path
base=Path(os.environ['GLASSMXRPH_SYSTEM_EVENTS']);saved=base.with_suffix('.state.json')
default={'brightness':{'available':True,'value':40,'devices':[]},'nightLight':{'available':True,'enabled':False},'dnd':{'available':True,'enabled':False},'profiles':{'available':True,'current':'balanced','profiles':['power-saver','balanced','performance']},'power':{'available':True,'lock':True,'logout':True,'suspend':True,'reboot':True,'shutdown':True}}
state=json.loads(saved.read_text()) if saved.exists() else default
req=json.loads(sys.argv[1])
if req['op']=='action' and base.with_suffix('.fail').exists():
print(json.dumps({'ok':False,'error':'Synthetic provider failure'}));sys.exit(1)
if req['op']=='action':
with base.open('a') as f:f.write(json.dumps(req)+'\n')
kind=req['action'];value=req.get('value')
if kind in ['nightLight','dnd']:state[kind]['enabled']=value
elif kind=='brightness':state[kind]['value']=value
elif kind=='profile':state['profiles']['current']=value
saved.write_text(json.dumps(state))
print(json.dumps({'ok':True,'state':state}))