aboutsummaryrefslogtreecommitdiff
path: root/awesompd.lua
diff options
context:
space:
mode:
authorAlexander Yakushev <yakushev.alex@gmail.com>2010-11-25 02:45:38 +0200
committerAlexander Yakushev <yakushev.alex@gmail.com>2010-11-25 02:45:38 +0200
commit615a378947f4401d94723258dd1d00630dce7f5a (patch)
tree0746763d4d94a64debf25c9ae13c38320f8830b0 /awesompd.lua
parent58174ffbf2659a8de5c0e2c9704526e44da61912 (diff)
downloadawesompd-615a378947f4401d94723258dd1d00630dce7f5a.tar.gz
awesompd-615a378947f4401d94723258dd1d00630dce7f5a.tar.bz2
Switched from hooks to signals
Diffstat (limited to 'awesompd.lua')
-rw-r--r--awesompd.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/awesompd.lua b/awesompd.lua
index ae3c081..142d934 100644
--- a/awesompd.lua
+++ b/awesompd.lua
@@ -102,8 +102,12 @@ function awesompd:run()
-- self:update_state()
self:check_playlists()
self.load_icons(self.path_to_icons)
- awful.hooks.timer.register(1, function () self:update_widget() end)
- awful.hooks.timer.register(self.update_interval, function () self:update_track() end)
+ self.update_widget_timer = timer({ timeout = 1 })
+ self.update_widget_timer:add_signal("timeout", function () self:update_widget() end)
+ self.update_widget_timer:start()
+ self.update_track_timer = timer({ timeout = 1 })
+ self.update_track_timer:add_signal("timeout", function () self:update_track() end)
+ self.update_track_timer:start()
end
-- Slightly modified function awful.util.table.join