Events
You can register an Event handler, which is called when a specific Event occurs, by using yabe.on.*. If you want to fire a Dispatcher in the Event handler, you need to pass it to yabe.dispatch(DispatcherID).
For example, if you want to launch waybar on yabe startup, add the following code to config.lua:
yabe.on.startup(function() yabe.dispatch(yabe.dispatchers.exec("waybar"))end)List of Events
Section titled “List of Events”yabe.on.startup()
Section titled “yabe.on.startup()”Register a callback called every time the compositor starts
parameters:- callback: fun()
yabe.on.config_reloaded()
Section titled “yabe.on.config_reloaded()”Register a callback called when the config is reloaded while the compositor is running
parameters:- callback: fun()
yabe.on.workspace_changed()
Section titled “yabe.on.workspace_changed()”Register a callback called when the current workspace is changed
parameters:- callback: fun(previous: integer, current: integer)
yabe.on.recentered()
Section titled “yabe.on.recentered()”Register a callback called when the front direction is reset
parameters:- callback: fun()