2.0 KiB
2.0 KiB
Wayshell Module System Plan
Overview
The Wayshell Module System is designed to provide a flexible and efficient way to manage different types of modules in a Wayland environment. The system will parse configuration files and trigger actions based on specific events.
Module Types
- Zone Module: Allows defining zones and triggers for entering and exiting these zones.
- Layout Module: Allows triggering actions based on the activation or deactivation of specific layout types.
- Focused Module: Allows triggering actions based on focusing or unfocusing specific client types.
Configuration Files
- wayshell.conf: General configuration file.
- wayshell.modules: Defines the modules.
Design Constraints
- Minimize CPU usage to less than 3% when running as a daemon.
- Avoid constantly running expensive commands.
Implementation Plan
Phase 1: Initial Setup
- Parse Configuration Files: Implement parsers for
wayshell.confandwayshell.modules. - Module Initialization: Initialize the different module types (Zone, Layout, Focused).
Phase 2: Event Handling
- Zone Module: Implement event triggers for entering and exiting zones.
- Layout Module: Implement event triggers for activating and deactivating layouts.
- Focused Module: Implement event triggers for focusing and unfocusing clients.
Phase 3: Performance Optimization
- Efficient Parsing: Optimize the parsing of configuration files to minimize CPU usage.
- Event Debouncing: Implement debouncing for events to avoid unnecessary triggers.
Phase 4: Testing
- Unit Tests: Write unit tests for each module type.
- Integration Tests: Write integration tests to ensure the modules work together correctly.
- Performance Tests: Conduct performance tests to ensure the system meets the CPU usage constraints.
Next Steps
- Review the plan and provide feedback.
- Proceed with the implementation based on the approved plan.