-
-
Notifications
You must be signed in to change notification settings - Fork 304
Description
Feature Description
Add a Custom Hooks system to Noctalia Shell that allows users to execute external shell commands when specific IPC actions are triggered (e.g., toggling keep-awake, locking the screen, or changing volume).
Why Is This Needed?
Currently, Noctalia's hooks are hardcoded and limited. Users who want to integrate Noctalia with external tools that don't natively support Wayland idle-inhibit protocols (like Stasis, specific notification daemons, or custom hardware lights) have no clean way to synchronize states without hacky wrappers or polling scripts.
###Suggested Solutions
Implement a hooks section in the configuration where keys correspond to IPC action names.
- Trigger-based naming: Hooks could be defined by the action name, such as keepAwake.toggle or lockScreen.lock.
- Execution Timing: Provide the ability to define if the hook runs before or after the internal Noctalia action.
- Example Config:
"hooks": {
"keepAwake.toggle": {
"command": "sh -c 'pkill -STOP stasis'",
"run_after": true
}
}Additional Context
This would allow seamless integration with the broader Wayland ecosystem. For instance, when using the Keep Awake button, a user could simultaneously pause a custom idle manager like Stasis via a simple CLI command without modifying the QML source code.