Use gears.timer
parent
bea3f2784b
commit
d694cce88b
9
mpc.lua
9
mpc.lua
|
@ -2,7 +2,8 @@ local awful = require("awful")
|
|||
local naughty = require("naughty")
|
||||
local wibox = require("wibox")
|
||||
|
||||
local timer = timer
|
||||
local timer = require("gears.timer")
|
||||
|
||||
local string = string
|
||||
local os = {
|
||||
getenv = os.getenv,
|
||||
|
@ -118,9 +119,9 @@ function mpc.init()
|
|||
end)
|
||||
))
|
||||
|
||||
local timer = timer { timeout = 2 }
|
||||
timer:connect_signal("timeout", function() tb:set_text(music_current_short()) end)
|
||||
timer:start()
|
||||
local tm = timer { timeout = 2, }
|
||||
tm:connect_signal("timeout", function() tb:set_text(music_current_short()) end)
|
||||
tm:start()
|
||||
|
||||
tb:set_text(music_current_short())
|
||||
return tb
|
||||
|
|
|
@ -2,7 +2,8 @@ local awful = require("awful")
|
|||
local wibox = require("wibox")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
local timer = timer
|
||||
local timer = require("gears.timer")
|
||||
|
||||
local string = string
|
||||
local tonumber = tonumber
|
||||
local os = {
|
||||
|
@ -72,9 +73,9 @@ function volume_widget.init(a_mode, a_channel)
|
|||
tb:buttons(but)
|
||||
img:buttons(but)
|
||||
|
||||
local timer = timer { timeout = 7 }
|
||||
timer:connect_signal("timeout", function() volume_widget.volume("display") end)
|
||||
timer:start()
|
||||
local tm = timer { timeout = 7, }
|
||||
tm:connect_signal("timeout", function() volume_widget.volume("display") end)
|
||||
tm:start()
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue