File: nextact.lua

package info (click to toggle)
ion3-scripts 20050418-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 300 kB
  • ctags: 153
  • sloc: makefile: 18
file content (18 lines) | stat: -rw-r--r-- 362 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- Go to first found region with activity flag set.

local function filteri(f, l)
    local res={}
    for _, v in ipairs(l) do
        if f(v) then
            table.insert(res, v)
        end
    end
    return res
end

function goto_nextact()
    local l=filteri(WRegion.is_activity, ioncore.clientwin_list())
    if l[1] then
        l[1]:goto()
    end
end