Skip to content

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)

Register a callback called every time the compositor starts

parameters:
  1. callback: fun()

Register a callback called when the config is reloaded while the compositor is running

parameters:
  1. callback: fun()

Register a callback called when the current workspace is changed

parameters:
  1. callback: fun(previous: integer, current: integer)

Register a callback called when the front direction is reset

parameters:
  1. callback: fun()