1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2025-07-31 21:59:42 -04:00

feat(ipc): hook, prev, next, reset module actions (#2528)

* WIP ipc actions

* feat(ipc): Add hook, prev, next and reset actions

Closes: #2464

* ipc: format code

* ipc: fix comparison

* Apply suggestions from code review

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* ipc: make index 0-based

* ipc: add 0-based indexing breaking change to Changelog

* ipc: restore 1-based index for  and  message

* ipc: fix initial=0 throwing an error

Co-authored-by: Martin Terneborg <martinterneborg@protonmail.com>
Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
This commit is contained in:
dvermd 2021-10-10 20:22:24 +02:00 committed by GitHub
parent 22014c70c4
commit 231af35354
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 108 additions and 27 deletions

View file

@ -261,9 +261,16 @@ custom/menu
custom/ipc
^^^^^^^^^^
:``send``: *(Has Data)* Replace the contents of the module with the data passed in this action.
.. versionadded:: 3.6.0
:``send``: *(Has Data)* Replace the contents of the module with the data passed in this action.
:``hook``: *(Has Data)* Trigger the given hook.
The data is the 0-based index of the hook to trigger.
:``next``: Switches to the next hook and wrap around when the last hook was displayed.
:``prev``: Switches to the previous hook and wrap around when the first hook was displayed.
:``reset``: Reset the module to its startup state: either empty or according to the ``initial`` setting.
.. versionadded:: 3.6.0
Deprecated Action Names
-----------------------