X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/8d37b9a1e4521a220f20ce2e1414f656aa3a5015..620bc5b57f40296fccfe6e714416fe5541b6fd15:/helpers.lua?ds=inline diff --git a/helpers.lua b/helpers.lua index a8c4cd7..c42ce61 100644 --- a/helpers.lua +++ b/helpers.lua @@ -1,15 +1,17 @@ --[[ - - Licensed under GNU General Public License v2 - * (c) 2013, Luke Bonham - * (c) 2010-2012, Peter Hofmann - + + Licensed under GNU General Public License v2 + * (c) 2013, Luke Bonham + * (c) 2010-2012, Peter Hofmann + --]] local debug = require("debug") -local rawget = rawget + +local capi = { timer = timer } local io = { open = io.open } +local rawget = rawget -- Lain helper functions for internal use -- lain.helpers @@ -28,7 +30,7 @@ end -- }}} --- {{{ Read the first line of a file or return nil. +-- {{{ Read the first line of a file or return nil function helpers.first_line(f) local fp = io.open(f) @@ -44,12 +46,12 @@ end -- }}} --- {{{ Timer maker +-- {{{ Timer maker helpers.timer_table = {} function helpers.newtimer(name, timeout, fun, nostart) - helpers.timer_table[name] = timer({ timeout = timeout }) + helpers.timer_table[name] = capi.timer({ timeout = timeout }) helpers.timer_table[name]:connect_signal("timeout", fun) helpers.timer_table[name]:start() if not nostart then