Search code examples
timerawesome-wm

Synchronize a timer with textclock refresh in AwesomeWM


I try to synchronize a cairo surface's update with my textclock refresh.

Is it possible to hook a gears.timer to textclock's one? or should I create a textbox and use the same gears.timer to update both?


Solution

  • By default, not without using private APIs, which is not recommended (mytextclock._timer).

    However, a better alternative is to create a timer, then create your own textclock using a wibox.widget.textbox when it timeouts. It can be done in 1 line using os.date