mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 19:34:03 +01:00
Twelve prose violations to zero. Eight files split into per-topic subdirectories with the original left as an index; both SKILL.md files keep their frontmatter so discovery still works, with detail moved to references/. Deleted docs/cleanup-2026-05/ (7 files) and linux_configuration/docs/ VERIFICATION.md on the user's ruling: unreferenced records of finished work whose rules are now enforced by the polling, shellcheck and shfmt hooks. PACMAN_WRAPPER_SECURITY.md was split instead - unlike those, it documents live guarantees. Every split verified by a sorted diff against HEAD: zero content lines lost, only the new headings and index links added. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
1.7 KiB
1.7 KiB
Part 2: Language Considerations
Shell (Bash) Limitations
Pros:
- Native to the system, no dependencies
- Direct access to systemd, chattr, filesystem
- Fast for simple operations
Cons:
- No persistent daemon capability (need systemd for that)
- Race conditions in file operations
- Complex state management is fragile
- No proper event loop for window monitoring
- Cannot easily monitor process list in real-time
Python Advantages for Certain Tasks
Where Python would be better:
- Process monitoring daemon - Watch for Steam/browsers in real-time with proper event loop
- Window management - Using
python-xlibfor proper X11 interaction - Complex state machines - Like the screen locker
- Cross-repo integration - The screen_lock.py already shows good patterns
Recommendation
| Component | Keep Bash | Move to Python | Reason |
|---|---|---|---|
| hosts guard | ✅ | Simple file ops, systemd integration | |
| shutdown schedule | ✅ | Systemd timers, config files | |
| screen locker | ✅ Already | Complex UI, state machine | |
| pacman wrapper | ✅ | Must intercept pacman | |
| compulsive block | ✅ | Needs daemon for auto-close | |
| music wrapper | ✅ | Needs real-time process monitoring |
New Python Daemon Needed: A single "digital wellbeing daemon" that:
- Monitors running processes
- Auto-closes apps after timeout
- Enforces Steam/browser mutual exclusion
- Can be controlled via DBus