module(..., package.seeall) function sprint(...) local t = {...} local n = select("#",...) local out = {} out[#out + 1] = (tostring(t[1])) for i = 2,n do out[#out + 1] = (tostring(t[i])) end return table.concat(out, "\t") end function print(...) io.stderr:write(sprint(...)) io.stderr:write("\n") end function warpdir(c,d) local tt = c:tags()[1] local scr = screen[c.screen] local alltags = scr:tags() local t for i = 1, #alltags do if alltags[i] == tt then t = i end end t = t + d if t == 0 then t = #alltags end if t > #alltags then t = 1 end c:tags { alltags[t] } awful.tag.viewonly(alltags[t]) end function warpprev(c) warpdir(c, -1) end function warpnext(c) warpdir(c, 1) end function nprint(...) local s = sprint(...) naughty.notify { text = "NPRINT: " .. s } end