-
-
Notifications
You must be signed in to change notification settings - Fork 723
Closed
Labels
Milestone
Description
With the new module action system, we can easily deprecate the old way of triggering hooks in the ipc module and replace it with a module action.
This has several advantages:
- Cleaner way of handling messages (just register for certain action names)
- Hooks can easily be triggered by click commands using the action syntax (``#module.name`)
- Use the same system as all other modules
I propose adding the following actions:
hook: To trigger the given hooknext/prev: To trigger the next/previous hook. This would solve the request in add hook state token for ipc #999append: To append text to the module (maybe a prepend as well)reset: To reset the module contents (maybe also reset the currently active hook)
Additional Context
The hook action should use a 0-based index for selecting the hook. Currently polybar-msg hook uses a 1-based index. This should also be clearly communicated in the docs.
#2463 already implemented a first action in the ipc module to display arbitrary text.