0

I want to replace deprecated awful.timer with gears.timer in my awesome-wm. But I having trouble starting it. I took function from the example as a prototype and wrote simple test function. Here it is:

gears.timer {
    timeout   = 1,
    autostart = true,
    callback  = function()
        print("!!Timeout!!")
    end
}

I placed it in the end of the rc.lua file and ran awesome. From the look of the awesome-wm output it looks like function never runs. How do I setup gears.timer so it runs?

P.S. I use this command to see the output of the awesome-wm:

DISPLAY=:0; Xephyr :1 -screen 800x600 -ac -br -noreset & \
DISPLAY=:1.0; sleep 1; awesome -c ~/.config/awesome/rc.lua
Sergey
  • 1,166
  • 14
  • 27

2 Answers2

1

Awesome 4.0 only supports the timeout argument for gears.timer. The autostart argument and the callback argument are new in awesome 4.1.

Uli Schlachter
  • 9,337
  • 1
  • 23
  • 39
0

I was able to make gears.timer work as a signal emitter:

timer = gears.timer {
    timeout   = 1
}

timer:connect_signal("timeout", function()
        print("!!Timeout!!")
    end
)

timer:start()

However I'm still a bit puzzled about usege of autostart and callback attributes.

Sergey
  • 1,166
  • 14
  • 27