engstrand-config / dtao-guile

A simple general-purpose statusbar for Wayland, configurable in Guile Scheme. Based on dtao and libguile
Other
22 stars 0 forks source link

Provide examples for blocks with signals #3

Open ghost opened 1 year ago

ghost commented 1 year ago

I've tried writing a custom volume indicator in my configuration but in order for it to update I need to make use of the interval field set to 1 so that it reflects volume changes. Ideally, I'd raise a signal from dwl-guile bindings and then update the block upon this, but I haven't been able to find any example in dtao-guile's or dtao's documentation to guide me on how to write this.

Frewacom commented 1 year ago

Hi!

After having a closer look, I realized that I have actually forgotten to implement signals 😄

Once implemented, using signals will require you to set a signal number in the block configuration, and the block will automatically re-render upon receiving that signal (i.e. you send a signal to dtao-guile using e.g. pkill).