Dispatchers
A Dispatcher is a function that performs some actions. Functions under yabe.dispatchers generate a Dispatcher function and return its ID (DispatcherID). For example, yabe.dispatchers.set_workspace(2) returns a DispatcherID that switches to workspace 2.
You can use a DispatcherID to register a Keybind. To fire a Dispatcher immediately (e.g., in Event handlers), use yabe.dispatch(DispatcherID).
List of Dispatcher generater
Section titled “List of Dispatcher generater”yabe.dispatchers.set_workspace()
Section titled “yabe.dispatchers.set_workspace()”Set the current workspace by absolute index
parameters:- index: integer
yabe.dispatchers.add_workspace_index()
Section titled “yabe.dispatchers.add_workspace_index()”Add to the current workspace index (can be negative)
parameters:- delta: integer
yabe.dispatchers.reset_ray()
Section titled “yabe.dispatchers.reset_ray()”Point the ray horizontally in the current head direction
yabe.dispatchers.recenter()
Section titled “yabe.dispatchers.recenter()”Make the current head direction the front
yabe.dispatchers.exec()
Section titled “yabe.dispatchers.exec()”Execute a shell command via `sh -c`
parameters:- command: string