mirror of
https://github.com/Sn3akyy1/lucid.git
synced 2026-11-19 13:22:32 +03:00
2eea91205d
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.0 KiB
1.0 KiB
applyTo, description
| applyTo | description |
|---|---|
| **/*.py | Conventions and practices for Python helper scripts and bridges in Lucid |
Python Helpers & Bridge Scripts Guidelines
When modifying or adding Python scripts in Lucid:
Output Format
- Python scripts invoked by Quickshell processes (
Process,ProcessView) should output strict, clean JSON over stdout without extra stdout log noise. - Direct debug or diagnostic logs to
sys.stderr.
Dependencies & Portability
- Maintain compatibility with standard Linux environments (Python 3.10+).
- Use standard library modules (
subprocess,json,sys,os,pathlib,re,argparse) wherever possible. - If using external dependencies (e.g.
PIL,numpy,fontToolsinlucidshot/ocr.pyorgi/GObject/Gioinkdeconnect-bridge.py), fail gracefully or provide readable stderr diagnostics.
Error Handling
- Handlers should handle subprocess failures (e.g.,
nmcli,hyprctl,kdeconnect-cli) cleanly without throwing unhandled exceptions that leave hanging processes.